Analysis exclusion not working as expected, what am I doing wrong


(Emil) #1

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
  • what are you trying to achieve
  • what have you tried so far to achieve this

I use SonarQube 7.3, with all the included plugins. Trying to do a scan via our TFS server with the latest 4.* plugin for TFS/VSTS

I get this output:

2018-08-28T14:51:38.2738361Z INFO: Test paths: TmpIndTest.cs, Properties/AssemblyInfo.cs, TransformSimpleLageTests.cs, TransformSimpleLageV2Test.cs, PresentationsHelperTest.cs, RapportTest.cs, TestData/allaResultat.xml, TestData/antiResultat.xml, TestData/basunSparVaxel_rawResult.xml, TestData/basunSparVaxel_RappDef.xml, TestData/basunSparVaxel_rawResultEmpty.xml, TestData/BuggSimpleLageSorteringAccAvstRappDef.xml, TestData/BuggSimpleLageSorteringAccAvstR�Resultat.xml, TestData/BuggL�ngsamSimpleLageTransformationRapportdefinition.xml, TestData/BuggL�ngsamSimpleLageTransformationRapportdefinitionR�dataResultat.xml, TestData/l�ngsamSimpleLageRapportDefinition.xml, TestData/l�ngsamSimpleLageRapportResultat.xml, TestData/samk�rtResultat.xml, TestData/TestRapportDefinition.xml, packages.config, tfsMsTestConfig.runsettings
2018-08-28T14:51:38.2738361Z INFO: Source encoding: UTF-8, default locale: en_US
2018-08-28T14:51:38.2894647Z INFO: Index files
2018-08-28T14:51:38.2894647Z INFO: Excluded sources: 
2018-08-28T14:51:38.2894647Z INFO:   **/*.xml
2018-08-28T14:51:38.2894647Z INFO: 21 files indexed
2018-08-28T14:51:38.3050885Z INFO: 0 files ignored because of inclusion/exclusion patterns
2018-08-28T14:51:38.3050885Z INFO: Quality profile for cs: <Company Name>
2018-08-28T14:51:38.3050885Z INFO: Quality profile for xml: <Company Name>
2018-08-28T14:51:38.3207142Z WARNING: WARN: Property missing: 'sonar.cs.analyzer.projectOutPaths'. No protobuf files will be loaded for this project.
2018-08-28T14:51:38.3207142Z INFO: Sensor C# Properties [csharp]
2018-08-28T14:51:38.3207142Z WARNING: WARN: No roslyn issues report not found for this project.
2018-08-28T14:51:38.3207142Z INFO: Sensor C# Properties [csharp] (done) | time=0ms
2018-08-28T14:51:38.3207142Z INFO: Sensor SonarJavaXmlFileSensor [java]
2018-08-28T14:51:38.3363426Z INFO: 13 source files to be analyzed
2018-08-28T14:51:38.3519642Z ERROR: Unable to parse xml file: D:\w1\1468\s\ProjectName2.Test\TestData\BuggL�ngsamSimpleLageTransformationRapportdefinition.xml
2018-08-28T14:51:48.7273631Z INFO: 1/13 files analyzed, current file: D:\w1\1468\s\ProjectName2.Test\TestData\BuggL�ngsamSimpleLageTransformationRapportdefinitionR�dataResultat.xml
2018-08-28T14:52:02.5091426Z INFO: 1/13 files analyzed, current file: D:\w1\1468\s\ProjectName2.Test\TestData\BuggL�ngsamSimpleLageTransformationRapportdefinitionR�dataResultat.xml
2018-08-28T14:52:15.9784136Z INFO: 1/13 files analyzed, current file: D:\w1\1468\s\ProjectName2.Test\TestData\BuggL�ngsamSimpleLageTransformationRapportdefinitionR�dataResultat.xml
2018-08-28T14:52:26.6975718Z INFO: ------------------------------------------------------------------------
2018-08-28T14:52:26.6975718Z INFO: EXECUTION FAILURE
2018-08-28T14:52:26.6975718Z INFO: ------------------------------------------------------------------------

As you can see I have excluded all xml files, but even though I have that exclusion filter, it tries to scan the xml files in the project.

The file is a 300MB+ and therefore it will fail trying to scan it, out of memory. The file doesn’t need to be scanned.

I also tried ignoring

TestData/**
**/TestData/**
*.xml

And none of that worked.

Any suggestions on what I am doing incorrectly?


(Nicolas Bontoux) #4

Hi Emil,

Could you activate debug logs in your VSTS build (sonar.verbose=true parameter for the SonarQube task, or I think you can also set system.debug to true when queuing the VSTS build) and share the full analysis logs in debug mode ? It will help understand how files/exclusions are treated in your specific case.


(Emil) #5

Absolutely, here you go (here are even more exclusions though…):

2018-08-29T08:17:48.1972299Z 10:17:48.197 INFO: -------------  Scan ProjectName2.Test
2018-08-29T08:17:48.1972299Z 10:17:48.197 INFO: Base dir: D:\w2\1082\s\ProjectName2.Test
2018-08-29T08:17:48.2128553Z 10:17:48.197 INFO: Working dir: d:\w2\1082\.sonarqube\out\.sonar\Namespace.ProjectName2_Namespace.ProjectName2_B8A6A90E-0FB4-4290-AF11-7B6EDE3C3837
2018-08-29T08:17:48.2128553Z 10:17:48.197 INFO: Test paths: TmpIndTest.cs, Properties/AssemblyInfo.cs, TransformSimpleLageTests.cs, TransformSimpleLageV2Test.cs, PresentationsHelperTest.cs, RapportTest.cs, TestData/allaResultat.xml, TestData/antiResultat.xml, TestData/basunSparVaxel_rawResult.xml, TestData/basunSparVaxel_RappDef.xml, TestData/basunSparVaxel_rawResultEmpty.xml, TestData/BuggSimpleLageSorteringAccAvstRappDef.xml, TestData/BuggSimpleLageSorteringAccAvstR�Resultat.xml, TestData/BuggL�ngsamSimpleLageTransformationRapportdefinition.xml, TestData/BuggL�ngsamSimpleLageTransformationRapportdefinitionR�dataResultat.xml, TestData/l�ngsamSimpleLageRapportDefinition.xml, TestData/l�ngsamSimpleLageRapportResultat.xml, TestData/samk�rtResultat.xml, TestData/TestRapportDefinition.xml, packages.config, tfsMsTestConfig.runsettings
2018-08-29T08:17:48.2128553Z 10:17:48.197 INFO: Source encoding: UTF-8, default locale: en_US
2018-08-29T08:17:48.2128553Z 10:17:48.212 DEBUG: Declared extensions of language CSS were converted to sonar.lang.patterns.css : **/*.css,**/*.less,**/*.scss
2018-08-29T08:17:48.2128553Z 10:17:48.212 DEBUG: Declared extensions of language Go were converted to sonar.lang.patterns.go : **/*.go
2018-08-29T08:17:48.2128553Z 10:17:48.212 DEBUG: Declared extensions of language Kotlin were converted to sonar.lang.patterns.kotlin : **/*.kt
2018-08-29T08:17:48.2128553Z 10:17:48.212 DEBUG: Declared extensions of language JavaScript were converted to sonar.lang.patterns.js : **/*.js,**/*.jsx,**/*.vue
2018-08-29T08:17:48.2128553Z 10:17:48.212 DEBUG: Declared extensions of language C# were converted to sonar.lang.patterns.cs : **/*.cs
2018-08-29T08:17:48.2128553Z 10:17:48.212 DEBUG: Declared extensions of language Java were converted to sonar.lang.patterns.java : **/*.java,**/*.jav
2018-08-29T08:17:48.2128553Z 10:17:48.212 DEBUG: Declared extensions of language Flex were converted to sonar.lang.patterns.flex : **/*.as
2018-08-29T08:17:48.2128553Z 10:17:48.212 DEBUG: Declared extensions of language XML were converted to sonar.lang.patterns.xml : **/*.xml,**/*.xsd,**/*.xsl
2018-08-29T08:17:48.2128553Z 10:17:48.212 DEBUG: Declared extensions of language PHP were converted to sonar.lang.patterns.php : **/*.php,**/*.php3,**/*.php4,**/*.php5,**/*.phtml,**/*.inc
2018-08-29T08:17:48.2128553Z 10:17:48.212 DEBUG: Declared extensions of language TypeScript were converted to sonar.lang.patterns.ts : **/*.ts,**/*.tsx
2018-08-29T08:17:48.2284811Z 10:17:48.212 INFO: Index files
2018-08-29T08:17:48.2284811Z 10:17:48.228 INFO: Excluded sources: 
2018-08-29T08:17:48.2284811Z 10:17:48.228 INFO:   **/*OpenLayers.js
2018-08-29T08:17:48.2284811Z 10:17:48.228 INFO:   **/*jquery*.js
2018-08-29T08:17:48.2284811Z 10:17:48.228 INFO:   **/*bootstrap.js
2018-08-29T08:17:48.2284811Z 10:17:48.228 INFO:   **/*moment*.js
2018-08-29T08:17:48.2284811Z 10:17:48.228 INFO:   **/wwwroot/lib/**
2018-08-29T08:17:48.2284811Z 10:17:48.228 INFO:   **/dojo*/**
2018-08-29T08:17:48.2284811Z 10:17:48.228 INFO:   **/knockout*.js
2018-08-29T08:17:48.2284811Z 10:17:48.228 INFO:   **/bootstrap*.js
2018-08-29T08:17:48.2284811Z 10:17:48.228 INFO:   **/modernizr*.js
2018-08-29T08:17:48.2284811Z 10:17:48.228 INFO:   **/*.xml
2018-08-29T08:17:48.2284811Z 10:17:48.228 INFO:   TestData/**
2018-08-29T08:17:48.2284811Z 10:17:48.228 INFO:   *.xml
2018-08-29T08:17:48.2284811Z 10:17:48.228 INFO:   TestData
2018-08-29T08:17:48.2284811Z 10:17:48.228 INFO:   **/TestData/**
2018-08-29T08:17:48.2284811Z 10:17:48.228 INFO:   **\TestData\**
2018-08-29T08:17:48.2284811Z 10:17:48.228 INFO:   TestData\**
2018-08-29T08:17:48.2284811Z 10:17:48.228 DEBUG: 'Properties\AssemblyInfo.cs' indexed as test with language 'cs'
2018-08-29T08:17:48.2284811Z 10:17:48.228 DEBUG: 'TransformSimpleLageV2Test.cs' indexed as test with language 'cs'
2018-08-29T08:17:48.2284811Z 10:17:48.228 DEBUG: 'TransformSimpleLageTests.cs' indexed as test with language 'cs'
2018-08-29T08:17:48.2284811Z 10:17:48.228 DEBUG: 'PresentationsHelperTest.cs' indexed as test with language 'cs'
2018-08-29T08:17:48.2284811Z 10:17:48.228 DEBUG: 'RapportTest.cs' indexed as test with language 'cs'
2018-08-29T08:17:48.2284811Z 10:17:48.228 DEBUG: 'TestData\allaResultat.xml' indexed as test with language 'xml'
2018-08-29T08:17:48.2284811Z 10:17:48.228 DEBUG: 'TestData\antiResultat.xml' indexed as test with language 'xml'
2018-08-29T08:17:48.2284811Z 10:17:48.228 DEBUG: 'TestData\basunSparVaxel_rawResult.xml' indexed as test with language 'xml'
2018-08-29T08:17:48.2284811Z 10:17:48.228 DEBUG: 'TestData\basunSparVaxel_RappDef.xml' indexed as test with language 'xml'
2018-08-29T08:17:48.2284811Z 10:17:48.228 DEBUG: 'TestData\BuggSimpleLageSorteringAccAvstRappDef.xml' indexed as test with language 'xml'
2018-08-29T08:17:48.2284811Z 10:17:48.228 DEBUG: 'TestData\basunSparVaxel_rawResultEmpty.xml' indexed as test with language 'xml'
2018-08-29T08:17:48.2284811Z 10:17:48.228 DEBUG: 'TestData\BuggL�ngsamSimpleLageTransformationRapportdefinition.xml' indexed as test with language 'xml'
2018-08-29T08:17:48.2284811Z 10:17:48.228 DEBUG: 'TestData\BuggSimpleLageSorteringAccAvstR�Resultat.xml' indexed as test with language 'xml'
2018-08-29T08:17:48.2284811Z 10:17:48.228 DEBUG: 'TestData\BuggL�ngsamSimpleLageTransformationRapportdefinitionR�dataResultat.xml' indexed as test with language 'xml'
2018-08-29T08:17:48.2284811Z 10:17:48.228 DEBUG: 'TestData\l�ngsamSimpleLageRapportDefinition.xml' indexed as test with language 'xml'
2018-08-29T08:17:48.2441061Z 10:17:48.228 DEBUG: 'TestData\l�ngsamSimpleLageRapportResultat.xml' indexed as test with language 'xml'
2018-08-29T08:17:48.2441061Z 10:17:48.228 DEBUG: 'TestData\samk�rtResultat.xml' indexed as test with language 'xml'
2018-08-29T08:17:48.2441061Z 10:17:48.228 DEBUG: 'TmpIndTest.cs' indexed as test with language 'cs'
2018-08-29T08:17:48.2441061Z 10:17:48.228 DEBUG: 'tfsMsTestConfig.runsettings' indexed as test with language 'null'
2018-08-29T08:17:48.2441061Z 10:17:48.228 DEBUG: 'TestData\TestRapportDefinition.xml' indexed as test with language 'xml'
2018-08-29T08:17:48.2441061Z 10:17:48.244 DEBUG: 'packages.config' indexed as test with language 'null'
2018-08-29T08:17:48.2441061Z 10:17:48.244 INFO: 21 files indexed
2018-08-29T08:17:48.2441061Z 10:17:48.244 INFO: 0 files ignored because of inclusion/exclusion patterns
2018-08-29T08:17:48.2441061Z 10:17:48.244 INFO: Quality profile for cs: CompanyName
2018-08-29T08:17:48.2441061Z 10:17:48.244 INFO: Quality profile for xml: CompanyName
2018-08-29T08:17:48.2597332Z 10:17:48.259 DEBUG: 'JavaSquidSensor' skipped because there is no related file in current project
2018-08-29T08:17:48.2597332Z 10:17:48.259 DEBUG: 'Generic Coverage Report' skipped because one of the required properties is missing
2018-08-29T08:17:48.2597332Z 10:17:48.259 DEBUG: 'Generic Test Executions Report' skipped because one of the required properties is missing
2018-08-29T08:17:48.2597332Z 10:17:48.259 DEBUG: 'Import external issues report' skipped because one of the required properties is missing
2018-08-29T08:17:48.2597332Z 10:17:48.259 DEBUG: 'SonarCSS Metrics' skipped because there is no related file in current project
2018-08-29T08:17:48.2597332Z 10:17:48.259 DEBUG: 'SonarCSS Rules' skipped because there is no related file in current project
2018-08-29T08:17:48.2597332Z 10:17:48.259 DEBUG: 'Import of stylelint issues' skipped because there is no related file in current project
2018-08-29T08:17:48.2597332Z 10:17:48.259 DEBUG: 'SonarGo' skipped because there is no related file in current project
2018-08-29T08:17:48.2597332Z 10:17:48.259 DEBUG: 'Go Unit Test Report' skipped because there is no related file in current project
2018-08-29T08:17:48.2597332Z 10:17:48.259 DEBUG: 'Import of go vet issues' skipped because there is no related file in current project
2018-08-29T08:17:48.2597332Z 10:17:48.259 DEBUG: 'Import of Golint issues' skipped because there is no related file in current project
2018-08-29T08:17:48.2597332Z 10:17:48.259 DEBUG: 'Import of GoMetaLinter issues' skipped because there is no related file in current project
2018-08-29T08:17:48.2597332Z 10:17:48.259 DEBUG: 'Kotlin Sensor' skipped because there is no related file in current project
2018-08-29T08:17:48.2597332Z 10:17:48.259 DEBUG: 'Import of detekt issues' skipped because there is no related file in current project
2018-08-29T08:17:48.2597332Z 10:17:48.259 DEBUG: 'Import of Android Lint issues' skipped because one of the required properties is missing
2018-08-29T08:17:48.2597332Z 10:17:48.259 DEBUG: 'SonarJS' skipped because there is no related file in current project
2018-08-29T08:17:48.2597332Z 10:17:48.259 DEBUG: 'SonarJS Coverage' skipped because there is no related file in current project
2018-08-29T08:17:48.2597332Z 10:17:48.259 DEBUG: 'Import of ESLint issues' skipped because one of the required properties is missing
2018-08-29T08:17:48.2597332Z 10:17:48.259 DEBUG: 'Import of Checkstyle issues' skipped because there is no related file in current project
2018-08-29T08:17:48.2597332Z 10:17:48.259 DEBUG: 'Import of PMD issues' skipped because one of the required properties is missing
2018-08-29T08:17:48.2597332Z 10:17:48.259 DEBUG: 'Import of SpotBugs issues' skipped because there is no related file in current project
2018-08-29T08:17:48.2597332Z 10:17:48.259 DEBUG: 'SurefireSensor' skipped because there is no related file in current project
2018-08-29T08:17:48.2597332Z 10:17:48.259 DEBUG: 'JaCoCoSensor' skipped because there is no related file in current project
2018-08-29T08:17:48.2597332Z 10:17:48.259 DEBUG: 'Flex' skipped because there is no related file in current project
2018-08-29T08:17:48.2597332Z 10:17:48.259 DEBUG: 'Flex Cobertura' skipped because there is no related file in current project
2018-08-29T08:17:48.2597332Z 10:17:48.259 DEBUG: 'PHP sensor' skipped because there is no related file in current project
2018-08-29T08:17:48.2597332Z 10:17:48.259 DEBUG: 'Analyzer for "php.ini" files' skipped because there is no related file in current project
2018-08-29T08:17:48.2597332Z 10:17:48.259 DEBUG: 'Import of TSLint issues' skipped because there is no related file in current project
2018-08-29T08:17:48.2597332Z 10:17:48.259 DEBUG: 'Import of ESLint issues' skipped because there is no related file in current project
2018-08-29T08:17:48.2597332Z 10:17:48.259 DEBUG: 'SonarTS' skipped because there is no related file in current project
2018-08-29T08:17:48.2597332Z 10:17:48.259 DEBUG: 'SonarTS Coverage' skipped because there is no related file in current project
2018-08-29T08:17:48.2597332Z 10:17:48.259 DEBUG: Sensors : C# Properties -> SonarJavaXmlFileSensor -> XML Sensor
2018-08-29T08:17:48.2597332Z 10:17:48.259 INFO: Sensor C# Properties [csharp]
2018-08-29T08:17:48.2597332Z 10:17:48.259 INFO: Sensor C# Properties [csharp] (done) | time=0ms
2018-08-29T08:17:48.2597332Z 10:17:48.259 INFO: Sensor SonarJavaXmlFileSensor [java]
2018-08-29T08:17:48.2597332Z 10:17:48.259 WARN: Property missing: 'sonar.cs.analyzer.projectOutPaths'. No protobuf files will be loaded for this project.
2018-08-29T08:17:48.2597332Z 10:17:48.259 WARN: No roslyn issues report not found for this project.
2018-08-29T08:17:48.2753601Z 10:17:48.275 INFO: 13 source files to be analyzed
2018-08-29T08:17:48.2909850Z 10:17:48.290 ERROR: Unable to parse xml file: D:\w2\1082\s\ProjectName2.Test\TestData\BuggL�ngsamSimpleLageTransformationRapportdefinition.xml
2018-08-29T08:17:48.3066101Z 10:17:48.306 DEBUG: XML file parsing failed because of : org.xml.sax.SAXParseException; systemId: file:/D:/w2/1082/s/ProjectName2.Test/TestData/BuggL%C3%A5ngsamSimpleLageTransformationRapportdefinition.xml; lineNumber: 1; columnNumber: 40; Content is not allowed in prolog.
2018-08-29T08:17:48.3066101Z 	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
2018-08-29T08:17:48.3066101Z 	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
2018-08-29T08:17:48.3066101Z 	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
2018-08-29T08:17:48.3066101Z 	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
2018-08-29T08:17:48.3066101Z 	at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source)
2018-08-29T08:17:48.3066101Z 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
2018-08-29T08:17:48.3066101Z 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
2018-08-29T08:17:48.3066101Z 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
2018-08-29T08:17:48.3066101Z 	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
2018-08-29T08:17:48.3066101Z 	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
2018-08-29T08:17:48.3066101Z 	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
2018-08-29T08:17:48.3066101Z 	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
2018-08-29T08:17:48.3066101Z 	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
2018-08-29T08:17:48.3066101Z 	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source)
2018-08-29T08:17:48.3066101Z 	at javax.xml.parsers.SAXParser.parse(Unknown Source)
2018-08-29T08:17:48.3066101Z 	at org.sonar.java.xml.XmlParser.parseXML(XmlParser.java:64)
2018-08-29T08:17:48.3066101Z 	at org.sonar.java.xml.XmlAnalyzer.simpleScan(XmlAnalyzer.java:93)
2018-08-29T08:17:48.3066101Z 	at org.sonar.java.xml.XmlAnalyzer.scan(XmlAnalyzer.java:79)
2018-08-29T08:17:48.3066101Z 	at org.sonar.plugins.java.XmlFileSensor.execute(XmlFileSensor.java:61)
2018-08-29T08:17:48.3066101Z 	at org.sonar.scanner.sensor.SensorWrapper.analyse(SensorWrapper.java:45)
2018-08-29T08:17:48.3066101Z 	at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:88)
2018-08-29T08:17:48.3066101Z 	at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:62)
2018-08-29T08:17:48.3066101Z 	at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:74)
2018-08-29T08:17:48.3066101Z 	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:166)
2018-08-29T08:17:48.3066101Z 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
2018-08-29T08:17:48.3066101Z 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
2018-08-29T08:17:48.3066101Z 	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:300)
2018-08-29T08:17:48.3066101Z 	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:295)
2018-08-29T08:17:48.3066101Z 	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:293)
2018-08-29T08:17:48.3066101Z 	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:269)
2018-08-29T08:17:48.3066101Z 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
2018-08-29T08:17:48.3066101Z 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
2018-08-29T08:17:48.3066101Z 	at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:48)
2018-08-29T08:17:48.3066101Z 	at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:82)
2018-08-29T08:17:48.3066101Z 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
2018-08-29T08:17:48.3066101Z 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
2018-08-29T08:17:48.3066101Z 	at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:131)
2018-08-29T08:17:48.3066101Z 	at org.sonar.batch.bootstrapper.Batch.doExecuteTask(Batch.java:116)
2018-08-29T08:17:48.3066101Z 	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:71)
2018-08-29T08:17:48.3066101Z 	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
2018-08-29T08:17:48.3066101Z 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2018-08-29T08:17:48.3066101Z 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2018-08-29T08:17:48.3066101Z 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2018-08-29T08:17:48.3066101Z 	at java.lang.reflect.Method.invoke(Unknown Source)
2018-08-29T08:17:48.3066101Z 	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
2018-08-29T08:17:48.3066101Z 	at com.sun.proxy.$Proxy0.execute(Unknown Source)
2018-08-29T08:17:48.3066101Z 	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:171)
2018-08-29T08:17:48.3066101Z 	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:128)
2018-08-29T08:17:48.3066101Z 	at org.sonarsource.scanner.cli.Main.execute(Main.java:111)
2018-08-29T08:17:48.3066101Z 	at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
2018-08-29T08:17:48.3066101Z 	at org.sonarsource.scanner.cli.Main.main(Main.java:61)
2018-08-29T08:17:48.3066101Z 
2018-08-29T08:18:02.0102620Z 10:18:02.010 INFO: 1/13 files analyzed, current file: D:\w2\1082\s\ProjectName2.Test\TestData\BuggL�ngsamSimpleLageTransformationRapportdefinitionR�dataResultat.xml
2018-08-29T08:18:21.8391464Z 10:18:14.823 INFO: 1/13 files analyzed, current file: D:\w2\1082\s\ProjectName2.Test\TestData\BuggL�ngsamSimpleLageTransformationRapportdefinitionR�dataResultat.xml
2018-08-29T08:18:33.5895984Z 10:18:33.589 INFO: 1/13 files analyzed, current file: D:\w2\1082\s\ProjectName2.Test\TestData\BuggL�ngsamSimpleLageTransformationRapportdefinitionR�dataResultat.xml
2018-08-29T08:18:33.6989804Z 10:18:33.698 INFO: ------------------------------------------------------------------------
2018-08-29T08:18:33.6989804Z 10:18:33.698 INFO: EXECUTION FAILURE
2018-08-29T08:18:33.6989804Z 10:18:33.698 INFO: ------------------------------------------------------------------------

(Nicolas Bontoux) #6

Useful hints in there:

2018-08-29T08:17:48.2284811Z 10:17:48.228 DEBUG: 'TestData\allaResultat.xml' indexed as test with language 'xml'
2018-08-29T08:17:48.2284811Z 10:17:48.228 DEBUG: 'TestData\antiResultat.xml' indexed as test with language 'xml'

The files (and others) are indexed as test files, so the exclusion parameter which would apply would be sonar.test.exclusions (see documentation).

That doesn’t necessarily justify why the analyzer is going through those test files (I’ll poke some more knowledgeable colleagues on that), but in the meantime should give you the workaround you’re looking for. :slight_smile:


(Emil) #8

Yeah, I realized that as I sent the logs. Already added ***.xml to test exclusions and now it worked.

Didn’t know about the sonar.verbose flag though. That is going to be helpful in the future debugging this stuff.


(Nicolas Bontoux) #9

Sure thing! Thanks for the follow-through.