wenzel_ua
(Viacheslav)
July 3, 2023, 1:03pm
1
which versions are you using: SonarScanner 4.8.0.2856
how is SonarQube deployed: zip
what are you trying to achieve: to check javascript code for bugs, cleanliness, etc.
We have around 14k lines of code and I see that sonarcloud step runs ~ 1.5h each time SonarCloud step is execued. Previously it was about 10 mins. Not sure what happened.
11:10:01.828 INFO: Total time: 1:20:35.711s
11:10:02.075 INFO: Final Memory: 775M/1408M
My sonar step is pretty simple
sonarcloud:
<<: *job-defaults
steps:
- attach_workspace:
at: .
- sonarqube/scan:
cache_version: 2
sonar_token_variable_name: SONAR_CLOUD_TOKEN
sonar_additional_params: "-Dsonar.externalIssuesReportPaths=audit/sonar-dep-vulns.json -Dsonar.javascript.lcov.reportPaths=reports/test/coverage/lcov.info"
Colin
(Colin)
July 4, 2023, 12:37pm
2
Hey there.
Do you have a tsconfig.json file in your project root?
We’re aware of an issue affecting our Javascript/Typescript analyzer that you can learn about here (as well as a workaround).
ALM used - GitHub
CI system used - GH actions
Languages of the repository - ts
We have sonarCloud configured for our nx monorepo (sonar.typescript.tsconfigPath is pointing to tsconfig in the monorepo root)
We trigger the scan via our GitHub actions workflow using the action: SonarSource/sonarcloud-github-action@master.
Until a few days ago our setup was working as expected, we are now experiencing a huge performance degradation:
scans on PR (one line modified) takes hrs - the scan tries to…
In principle, using the property sonar.typescript.tsconfigPath
to point to the tsconfig.json in the project root should solve the issue.
And, a better fix should be deployed to SonarCloud soon.
wenzel_ua
(Viacheslav)
July 4, 2023, 7:20pm
3
no, we don’t have tsconfig.json in our project
Colin
(Colin)
July 5, 2023, 7:18am
4
Thanks. I suggest trying this workaround then:
Hi @Paul_Rankin ,
As a workaround, can you please create a tsconfig.sonar.json in the root of your project with the following contents?
{
compilerOptions: {
allowJs: true,
noImplicitAny: true,
},
}
Then, set the property sonar.typescript.tsconfigPath=tsconfig.sonar.json in the analysis.
Please let me know if that helps.
Cheers,
Victor
1 Like