No issues detected from JavaScript files

(Leandro Pignatta) #1

I’m using the “Sonar Way” Quality Gate and the “(JavaScript)Sonar way Recommended” Qualify Profile to detect issues in JavaScript files. I have a .js file with multiples errors (in purpose) and the report is generating without issues/errors. Any ideas?


(G Ann Campbell) #2


We’ll need a little more to go on. Specifically:

  • analysis parameters and command line
  • analysis log
  • whether JavaScript is recognized in your project (if you look at the top-right of the project homepage, do you see a LOC count for JavaScript?)

Also, version numbers are always a good thing. :slight_smile:


(Leandro Pignatta) #3

Oh, I forgot to mention that I am using the Sonar Cloud extension in Azure DevOps.

EDIT: cannot locate the LOC count, but the JS file is in the Code tab of the project.

(G Ann Campbell) #4


So this project is built with MSBuild and analyzed with the start and end steps?


(Leandro Pignatta) #5

Yes, I put in the Build the tasks in order with all the configuration:

-Prepare analysis on SonarCloud
-Build VS Solution
-Run Code Analysis
-Publish Qualify Gate Result

(G Ann Campbell) #6


I think this is about your project “content”. Files not referenced in a .proj file will be ignored by analysis. Try adding <Content Include="src\**\*.js" /> to a project file.


(Leandro Pignatta) #7

That was the magic!!! Thanks Ann :smiley: