Programming language you’re coding in: Javascript/Typescript and HTML
Is connected mode used: No
Hello everyone. Quite new to all the quality software stuff and i appreciate a lot the help that the description rule tab does when i program the java part of my project. I’d like to see the same behaviour with the js/html part, but for some reason i can only see the highlighted lines where sonarLint catch some rule violation. Usually when i click on one of those hightlightes in the java files, i have the option to see the detailed rule description in the Rule Description Tab. For js and html part that’s seem to be unavailable, the most close way i found is to launch an analyze and then click on the rule issue in the SonarLint report, but the result are poorly readable.
Is just a problem of mine or is a missing feature or something?
My nodejs version is v14.18.0, and the analysis runs without problems, since i can see the highlighted violations. If I implements correction the highlights goes out as soon as i save.
Thanks, it’s exactly the same here only with another nodejs version on path.
But the console (verbose = true) has
Node.js path provided by configuration: C:\Program Files\nodejs\node.exe
Launching command C:\Program Files\nodejs\node.exe -v
Using Node.js v18.12.1.
[…]
Starting Node.js process to start the bridge server at port 49438
Execute Sensor: JavaScript/TypeScript analysis
Skipping the start of the bridge server as it failed to start during the first analysis or it’s not answering anymore
No rules will be executed
let me jump on the train as well, Tobias here from SonarLint for Eclipse.
@gix85 which editor are you opening the JS/HTML files with? You can see that when right-clicking on the file in the Project / Package Explorer and hover over Open With >
These different editors are contributed by plug-ins installed in Eclipse, like every language (JDT for Java) bringing their own Editor, there is no real “shared” editor, even though they might look the same. The Eclipse WST plug-ins are used for Web stuff, for example, JS/HTML included. Do you have them installed?
If possible, try the Generic Text Editor option and check if that works, if not it may be due to Eclipse WST not being installed.
If you cannot access an issue from the Editor itself, there is always the option to have the SonarLint On-The-Fly view opened in parallel which will show you the Editor issues as well but in a list view.
If it doesn’t work for you or you have any further questions, feel free to get back to me.
Best,
Tobias
Opening the file with generic text editor i’m now able to call the description, while if i use the HTML editor (I believe it’s using Eclipse Enterprise Java and Web Developers Tools 3.21), the description selector doesn’t appear.
So, now i have a chance to work with html editor when programming and with generic text editor when fixing all that old stuff, but there’s any way to do all using one tool?
the best way to see all the issues of the current file is to have the SonarLint On-the-fly view opened as well. It is independent of the editor opened as it just cares for the actual file and therefore will show you the same markers as the editor does, just not at the actual text range but in a list view.
From that view you have the same options (or more) as from the pop-up in the editor: You can view the rule, apply quick fixes, or even mute it.
Working on SonarLint I have more or less the same struggles, most of the time the editor is supported and shows the markers but for a few corner cases (like you had) I have only the option of looking in our SonarLint On-the-fly view.
If you search for a “tool” that is always containing all the file issues and is independent of the editor, choose to use this view. Being a list is also quite simple to use, you also have the option to sort and group if that is something you prefer.
In the meantime, we also try to get more editors to show the issues directly in the lines but it is always a limitation on the editor side that we have to (try to) overcome which might not be possible.