I recently setup SonarCloud for the first time using the default configuration for automatic analysis from GitHub.
I have already tried recreating the project. The online project configuration also looks like it should analyze these files.
Thanks in advance!
Can you let us know how the tsconfig.json file is configured for this project? Feel free to paste it here.
As the repository is a monorepo containing multiple sub-projects there is no tsconfig in the root directory (could that be the problem?).
Following is the tsconfig for one of the apps located in a subdirectory:
"include": ["**/*.ts", "**/*.tsx", "next-env.d.ts"],
"exclude": ["node_modules/", "cypress/"]
Each project has its own tsconfig.
Let me know if the inherited compilerOptions are relevant.
Hi Colin, are there any updates on this?
Also, I’m not sure if you saw my reply.
We are taking a look at the logs on SonarCloud and get back to you.
Did you have a look at this page regarding importing monorepos on SonarCloud?
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.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.