How to set file exclusions with a new repo?

I’ve been using SonarCloud with several Java repos and everything is working well. However, I also have a Javascript/Typescript repo in my org and I cannot import because it contains some directories with large numbers of files. However, I want to exclude most of those files (html/css assets for example) but I’m stuck.

I can’t onboard the repo with exclusions in place ahead of time. Also, when I do import it and the initial scan fails, I can set exclusions in the SonarCloud settings for the repo but then I can’t re-run the initial scan.

Is there a way I can work around this chicken-and-egg problem?

Hey there.

Yeah, I imagine this isn’t a great user experience. :confused: Ideally (in my opinion) we would be able to guess that your repo is too large and not fail – or be more helpful when analysis does fail (estimating LoC without analysis isn’t the easiest task). I’ll raise this point internally.

You can add another commit, which should trigger a new analysis.

Or, ahead of time, you can add a .sonarcloud.properties file.