Hi, I have the following block running in a pipeline.
steps:
- task: SonarCloudPrepare@1
displayName: 'Prepare analysis configuration'
inputs:
SonarCloud: '***_admin'
organization: '***'
scannerMode: 'CLI'
configMode: 'manual'
cliProjectKey: ${{ parameters.projectKey }}
cliProjectName: ${{ parameters.projectName }}
cliSources: ${{ parameters.sources }}
extraProperties: |
sonar.javascript.lcov.reportPaths=$(Pipeline.Workspace)/reports/lcov.info
sonar.eslint.reportPaths=$(Pipeline.Workspace)/reports/eslint-result.json
In a previous stage is where the reports get generated. So when this stage and steps run, ESLint displays the following: No ESLint issues will be imported on this file. I know this is because the paths from the prior stage are different than the paths in the Sonar stage. The reports all have /home/vsts/work/1/s/src. and when the Sonar stage runs the project is installed in /a/1/s/src/
I tried various things, such as running a sed cmd in the above steps to change the path, but I still get errors. Any suggestions?