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?

Thanks!


(G Ann Campbell) #2

Hi,

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:

 
Ann


(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

Hi,

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

 
Ann


(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

Hi,

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.

 
Ann


(Leandro Pignatta) #7

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