Feasibility of combining multiple rules of different languages

Hello Community,
I’m a newbie here is that feasibility of combining two rules of different types in a same project. I have already written a rule inside the java plugin for one condition and was able to raise violation. However second rule must be triggered only after first rule says true. That’s the point in short(Combination of rules).

  1. Scan one source folder with flow language code for condition and find if its true.
  2. If true, only then scan second source folder with xml configs and raise violation in a case.

Command for scan is right now: sonar-scanner.bat -D"sonar.projectKey=WM" -D"sonar.sources=." -D"sonar.host.url=http://localhost:9000" -D"sonar.token=sqp_5a15ca9969425bc28e1eb9ed2d2e4f85bac498cf"

Should I be creating two different project in sonar UI? But then, my rules are dependent.

Note: I have posted the similar query in another post, but didn’t get a valid/straight answer or approach (SonarQube Trigger a rule check from another rule inside plugin).

Best Regards,

Hey there.

Please dont’ create a new post because you didn’t like the (very valid) advice you got on the last thread. :slight_smile:

I will close this as a duplicate. If you want to continue the discussion, do so on that thread.

1 Like