In one of our projects on sonarcloud.io, we explicitly set the useUnknownInCatchVariables typescript compiler option to false as it is enabled by default in strict mode in TS 4.4 (see their release announcement).
during analysis. For pull requests, the results still seem fine, but on the main branch, SonarCloud just says The main branch has no lines of code. This looks very similar to this thread I found in the archive where another typescript compiler option caused similar behavior.
It would be great if you could support the new flag / make sure it doesn’t break the analysis. Thanks!
Yep getting the same issue here. Would be nice to be able to set the Typescript version rather than just use whatever is built-in. I am using the Docker image so I’m only able to use whatever it comes with rather than whatever version is defined in my package.json (in this case it’s 4.4.2)
Unfortunately the only workaround is to create another tsconfig file without the option, which is used only for analysis and set via sonar.typescript.tsconfigPath property in sonar-project.properties file.