SonarLint for VS Code 1.4.0 doesn't seem to work

vscode

(Janos Gyerik) #1

On behalf of a review on the marketplace:

Doesn’t work. I installed and nothing happens. I’m on MacOS and I have Java8 installed and I also tried to set Java home path in settings and still doesn’t work. Nothing happens, no error no nothing, so not sure what to even try to do.

Also:

I followed all available instructions. Could not get it to work.


(Janos Gyerik) #2

Hi, first of all, thank you for reporting this. Although we tested the extension carefully, it’s possible that we overlooked something. SonarLint should report code quality issues in the Problems view when …:

  1. On files of one of the supported languages (JavaScript, TypeScript, Python, PHP)
  2. When there are any issues to report :slight_smile:

Are you using one of the supported languages? Are you expecting to see issues? Would be possible to share with us a snippet where you expect something to see?

As a quick sanity check, you could create a .js file with alert(“foo”); That should certainly raise an issue.

Please let us know, thanks!


(Daniel Anechitoaie) #3

Hah, I think I figured it out why it wasn’t working. Seems that I was testing the extension with a file named test.js and that was ignored. If I rename the file anything else that doesn’t contain the word test it’s working.

I’ll change my review and add a note about this.

Would be nice if you can update the README with a note about this as for quick tests I assume most of the people would just instinctively create a file named test.ext.

Or maybe by default let it lint all files and then if you want you can set some ignores.

Thank you.


(Janos Gyerik) #4

Thank you Daniel for the update, and special thanks for revising the rating. Well-spotted about the exclusion of test.EXT. I took note of it and we will improve on the situation, one way or another. (I will update this post later with a ticket number.)


(Janos Gyerik) #5

(Oops I forgot about this thread.)

I created a ticket to address the issue raised about the potential confusion: https://jira.sonarsource.com/browse/SLVSCODE-48