Set up for domain driven repository

  • ALM used: GitHub
  • CI system used: Circle CI
  • Languages of the repository: TypeScript, React (.tsx)

Hey all :wave: ,
I’m new to SonarCloud, so apologies if I may be using wrong terminolgy.

My company is using SonarCloud with CircleCI integration successfully for Java and Kotlin projects, and I’m trying to set up a SonarCloud for web application.

We’re building SPA using TypeScript / React. The repository is structured using domain driven architecture, where the engineers of each team are responsible for their directories. We have one CI pipeline based on CircleCI.
We would like to have separate definitions / rules for each team. Example folders signup and login should use rule set “a”, folder component-libarary should follow rule set “b”, folder help-center should use rule set “c”, etc.
Failing to meet rule set standards should fail check and prevent PR from being merged.

So far I’ve tried using monorepo approach, but I was unable to narrow down scan to specific folders. sonar-project.properties must be at the root level of the repository, but then how should I pair rule set with folder? Ideally there could be a sonar-project.properties file in each folder, but I’m not sure to configure that.

If there’s a better way to implement something like this I’ll be happy to hear it.

Thanks :pray:

Hi,

Welcome to the community!

Sounds like you’re on the right track.

Okay… yes. That’s true in a … (what’s the opposite of monorepo?) normal context. Really the file needs to be at the project root. In a normal context, that’s the repo root, but in a monorepo context, it’s going to be at the top of the folder. So one file per folder, in the “folder root”.

Does that help?

 
Ann

Thanks for the quick reply. :pray:
I’ll try it and report back.