1

I'm trying to use Sonar with Javascript, and rather than ignoring errors after analysis in SonarQube, I'd like to just comment some lines with so that they never get flagged. (Something like the // NOSONAR comment in Sonar for Java that suppresses an error on the following line, or the eslint-disable-line for eslint).

I'd like to document the ignored Sonar issues in the code, rather than in the sonarqube database.

Part of the reason I want this is because for the moment we're just installing sonar on each developers machine, (using brew and a shell script), so each dev has their own database.

1 Answers1

1

NOSONAR should work for SonarJS as well. But it's really not recommended way to go, prefer using "won't fix" in SonarQube UI

Elena Vilchik
  • 1,085
  • 6
  • 11
  • NOSONAR does not work with SonarJS 6. This business of setting "won;t fix" is not productive. IMO the Sonar people can take a lesson or 2 from ESLint and other linters on how it is done. I would prefer ignores or rules customization using overides like ESLint overrides->rules – bhantol Mar 25 '21 at 21:36