Since the new project structure / upgrade has come to SonarCloud, analysis on a lot of our files has disappeared. The two screenshots below demonstrate the state of the project pre and post the file structure change that was released.
We used to have exclusions applied to the some of the files (hence why the content folder has less lines of code), but after removing all ‘Coverage Exclusions’ and all ‘Source File Exclusions’, these files are still not being analysed.
We have not set any properties in the Azure Devops pipeline, They are just the standard ‘Prepare’, ‘Run’ and ‘Publish’ tasks.
The run analysis file has no errors, but it doesn’t seem to be finding much to scan:
INFO: ------------- Run sensors on module FTA.PCN.Web
INFO: 1/1 source files have been analyzed
INFO: Sensor SonarCSS Metrics [cssfamily]
INFO: Sensor SonarCSS Metrics [cssfamily] (done) | time=641ms
INFO: Sensor SonarCSS Rules [cssfamily]
INFO: Sensor SonarCSS Rules [cssfamily] (done) | time=81028ms
INFO: Sensor C# Properties [csharp]
INFO: Sensor C# Properties [csharp] (done) | time=0ms
INFO: Sensor JavaXmlSensor [java]
INFO: 3 source files to be analyzed
INFO: Sensor JavaXmlSensor [java] (done) | time=141ms
INFO: Sensor XML Sensor [xml]
INFO: Sensor XML Sensor [xml] (done) | time=0ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: 3/3 source files have been analyzed
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=0ms
Is JavaXmlSensor for Javascript? Our projects are c# and contain no Java.
I’m not sure what other helpful information I can post.
Many thanks,
Pete
EDIT: Looking at the Sonar Context for the latest analysis, it seems there are no source files being passed in:
- sonar.projectKey=PCNAdmin:PCNAdmin:787814B2-448A-46B5-AFEB-C54F2A3019BD
- sonar.projectName=FTA.PCN.Web
- sonar.sourceEncoding=utf-8
- sonar.sources=
EDIT2: It seems the scanner is ignoring our JavaScript files, when you look at the project overview, there are no LOC for JS…