Skip to content

SaveException: The file doesn't exist #9

@merjadok

Description

@merjadok

Hello,

We are getting a following error when running the TS analysis for our project:

INFO: Sensor Lines Sensor
INFO: Sensor Lines Sensor (done) | time=0ms
INFO: Sensor TslintQualitySensor
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 36.876s
INFO: Final Memory: 55M/511M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
fr.sii.sonar.report.core.common.exception.SaveException: The file frontend\mobile\custom_typings\file.ts doesn't exist
	at fr.sii.sonar.report.core.common.util.FileUtil.checkMissing(FileUtil.java:239)
	at fr.sii.sonar.report.core.common.util.FileUtil.checkMissing(FileUtil.java:106)
	at fr.sii.sonar.report.core.quality.save.QualitySaver.save(QualitySaver.java:42)
	at fr.sii.sonar.report.core.quality.save.QualitySaver.save(QualitySaver.java:28)
	at fr.sii.sonar.report.core.common.ReportSensor.analyse(ReportSensor.java:106)
...

We have the following structure

\---sonar-project.properties
+---src
|   +---backend
|   +---frontend
|   |   +---mobile
|   |   |   +---custom_typings
|   |   |   |   \---file.ts
|   |   +---reports
|   |   |	+---sonar
|   |   |	|	\---tslint.json

This is how we configured the Gulp task:

gulp.task('sonar', function() {
    return SonarWebReporters.launchReporters({
        project: 'Project',
        css : false,
        js : false,
        eslint : false,
        eslint_angular: false,
        html: false,
        ts: {
          src: [
            '**/*.ts',
            '!node_modules/**/*',
            '!common/jspm_packages/**/*',
            '!mobile/jspm_packages/**/*',
            '!webortal/jspm_packages/**/*'
          ],
          report: "reports/sonar/tslint.json",
          rulesFile: "../tslint.json",
          task: "ci-tslint",
          linter: require("gulp-tslint")
        }
    });
});

and this is the output we get in reports/sonar/tslint.json (just part of it):

{
"language" : "reports/sonar/tslint.json",
"project" : "Project",
"projectPath" : ".",
"version" : "1.1.0",
"files" : [{
	"name" : "file.ts",
	"path" : "mobile\\custom_typings\\file.ts",
	"nbLines" : 1711,
	"nbComments" : 0,
	"nbCloc" : 1574,
	...

It seems that paths are somehow wrong but I cannot find any configuration which actually works. Am I doing something obviously wrong here?

Thanks in advance and best regards,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions