2

I have configured a long list of sonar.javascript.globals on the server side (SonarQube) for all js projects, however when triggering a sonar check from CI with sonar-maven-plugin I get the known S3827 (ReferenceErrorCheck). When I extend the mvn command to include Dsonar.javascript.globals=CustomFunc, this CustomFunc is respected as known.

Is there a way to fix this or I have misunderstood the usage of the global setting? Thanks.

omikes
  • 8,064
  • 8
  • 37
  • 50
modzozo
  • 13
  • 4
  • 1
    Can you provide more details about what you exactly do? – nyr1o Feb 28 '18 at 02:49
  • 1
    First, thanks @omikey for the edit. @louis-suggy I run sonar checks on js projects and have defined a list of sonar.javascript.globals under General Settings, however those seem to be ignored and I have to explicitly provide the variables and functions for the sonar-maven-plugin as: `mvn sonar:sonar -Psonar -Dsonar.host.url=http://host -Dsonar.branch=master -Dsonar.report.export.pat -Dsonar.javascript.globals=Server`, otherwise the quality gate fails with ReferenceErrorCheck. Is that more clear? – modzozo Feb 28 '18 at 12:41
  • Can you post debug log of your analysis (output of `sonar-scanner -X`? Are you sure you are not overriding your global settings in your `sonar-project.properties`? – Tibor Blenessy Aug 02 '18 at 07:34

0 Answers0