No issues detected from JavaScript files

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!

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

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.

Hi,

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

 
Ann

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

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

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

1 Like