SonarJS 6.2 does not find any issues at all, anymore

Hi. This is a follow-up to the post Reduce number of lines for some issues.

After upgrading to 6.2, in the hope it would fix the above issue, the SonarLint extension in my VS Code now reports 0 errors for all of my files… which just is not correct (it just cannot be :smiley_cat: ).

In other words: the function which was completely underlined and reason to write issue 18474 became completely issue-free after upgrade to 6.2.

So something seems wrong, either with my configuration, or with the updated plugin. Any ideas?

Here is the SonarLint output of VS Code:

[Info  - 10:29:21.224] Downloaded plugin list in 68ms
[Info  - 10:29:21.267] Downloaded settings in 43ms
[Info  - 10:29:24.698] Using storage for server '[redacted]' (last update 2/19/20 10:29 AM)
[Info  - 10:29:25.087] Downloaded settings in 120ms
[Info  - 10:29:27.180] Downloaded settings in 42ms
[Info  - 10:29:29.452] Analyzing file 'file:///redacted/path/to/file1.js'...
[Info  - 10:29:31.194] Found 0 issue(s)
[Info  - 10:29:31.195] Analyzing file 'file:///redacted/path/to/file2.js'...
[Info  - 10:29:32.354] Found 0 issue(s)

Hi @p3k

There are two new settings to enable more verbose logs. Could you please enable them and provide analysis logs?


1 Like

thanks for the information @Julien_HENRY – here are some lines which look like trouble:

[Error - 13:21:03.643] SyntaxError: Error while loading rule 'comment-regex': Invalid regular expression: /(?i).*FIXME.*/: Invalid group
[Error - 13:21:03.643] Occurred while linting /redacted/path/file.js
[Error - 13:21:03.643]     at new RegExp (<anonymous>)
[Error - 13:21:03.643]     at Object.create (/home/tobi/.sonarlint/work/.sonartmp_5617646404245978875/eslint-bridge-bundle/package/lib/rules/comment-regex.js:42:53)
[Error - 13:21:03.643]     at createRuleListeners (/home/tobi/.sonarlint/work/.sonartmp_5617646404245978875/eslint-bridge-bundle/package/node_modules/eslint/lib/linter.js:578:21)
[Error - 13:21:03.643]     at /home/tobi/.sonarlint/work/.sonartmp_5617646404245978875/eslint-bridge-bundle/package/node_modules/eslint/lib/linter.js:732:31
[Error - 13:21:03.643]     at Array.forEach (<anonymous>)
[Error - 13:21:03.643]     at runRules (/home/tobi/.sonarlint/work/.sonartmp_5617646404245978875/eslint-bridge-bundle/package/node_modules/eslint/lib/linter.js:690:34)
[Error - 13:21:03.643]     at Linter._verifyWithoutProcessors (/home/tobi/.sonarlint/work/.sonartmp_5617646404245978875/eslint-bridge-bundle/package/node_modules/eslint/lib/linter.js:899:31)
[Error - 13:21:03.643]     at /home/tobi/.sonarlint/work/.sonartmp_5617646404245978875/eslint-bridge-bundle/package/node_modules/eslint/lib/linter.js:955:35
[Error - 13:21:03.643]     at (<anonymous>)
[Error - 13:21:03.643]     at Linter.verify (/home/tobi/.sonarlint/work/.sonartmp_5617646404245978875/eslint-bridge-bundle/package/node_modules/eslint/lib/linter.js:954:42)
[Error - 13:21:03.646] Failed to analyze file [[uri=file:///redacted/path/file.js]]: Error while loading rule 'comment-regex': Invalid regular expression: /(?i).*FIXME.*/: Invalid group
Occurred while linting /redacted/path/file.js

Hello @p3k,

The problem you are facing is related to this known issue.

Luckily for you, it seems that you are using S124 to detect FIXME tag, and it happens that we added a new rule exactly for that. See S1134.

I would therefore advise you to not use S124 anymore, and be sure that S1134 is active!



hi @Quentin thanks for the hint – in fact, deactivating S124 worked like a charm!

sonarlint now displays a lot of issues for the files again (nothing to be surprised of). and issue 18474 is fixed, too! yay!

however, i think there still is room for improvement regarding the underlining of functions with other issues. gonna check if corresponding issues already exists and will add new ones if not.