koliveira15 / nx-sonarqube

A Nx plugin that scans projects using SonarQube / SonarCloud.
MIT License
52 stars 21 forks source link

Analyze independently each project, without their static dependencies #66

Open Nxtivision opened 9 months ago

Nxtivision commented 9 months ago

We are building a Design System, and we would like to see Sonar Analyses for each of our lib independently. At the moment, if A is dependent of B, I will have the bugs of B and A inside the analytics.

For example:

flowchart LR
  subgraph libraries[nx run A:sonar]
  B[Library B containing 5 bugs] -.-> A[Library A containing 1 bug]
  end
  libraries --> Result[6 bugs in total]

What I would like:

flowchart LR
  subgraph libA[nx run A:sonar]
  A[Library A containing 1 bug]
  end
  subgraph libB[nx run B:sonar]
  B[Library B containing 5 bugs]
  end
  libA --> ResultA[1 bug in total]
  libB --> ResultB[5 bugs in total]

Do you think it would be possible to provide an option for this use case ? 😄

Thanks in advance and have a nice day !

koliveira15 commented 9 months ago

@Nxtivision I think this is an acceptable request. I just need to think through how to specify which mode via executor options since skipImplictDeps already exists and has some crossover with this feature.

kiwi-33 commented 8 months ago

This would add a huge performance improvement for us as well. We have projects with many dependencies, and it would be great to have the ability to toggle this on/off.

fdolsky321 commented 8 months ago

Looking for this feature too.

CaporalDead commented 3 days ago

We achieved this by modifying the getDependentPackagesForProject function to return no dependencies. Also, specify the tsconfig file to avoid scanning all workspace tsconfig files ( "tsConfig": "{projectRoot}/tsconfig.json")