I recently setup SonarCloud for the first time using the default configuration for automatic analysis from GitHub.
The problem that I am now facing is that TypeScript files (ts & tsx) which make up the majority of the codebase are not being analyzed by SonarCloud. Other files such as regular JavaScript are being detected without issues and according to this docs article TypeScript should also be supported for automatic analysis.
I have already tried recreating the project. The online project configuration also looks like it should analyze these files.
After you pointed me there, I tried following these instructions but was quickly confused as the setup process for every project asked me to completely override the sonar config file in the repo’s root. While the one sub-project I set up successfully now also includes SQL files, TS files are still missing.
I also tried pointing to one of my nested tsconfigs but without success.
What in the end solved this problem for me (or just serves as a workaround) was adding a tsconfig.json to the root of my monorepo which includes all ts and tsx files:
{
"include": ["**/*.ts", "**/*.tsx"]
}
Having another solution to this problem would of course be great but for now this works. Might also be that this is an intentional design design.