butammu
(Budha)
March 11, 2024, 6:31am
1
Hi Team,
We are maintaining the both maven and typescript code in single git repository
we are able to scan the maven Project but not typescript code. Could you please provide some information to scan both maven and typescript single time.
Thank you!
Colin
(Colin)
March 12, 2024, 9:49am
2
Hey there.
Searching is your friend! Take a look at threads like these:
You are my true hero today! Many thanks.
All it took to have a unified analysis was indeed to add this property to the POM file of portal-frontend: <sonar.sources>app</sonar.sources>.
I took this opportunity to also add <sonar.skip>true</sonar.skip> as a property of those modules that do not contain source code (e.g. packaging modules), so that things would be more sensible.
Hello @Jave-Chen , welcome to the community forum!
It is certainly possible to analyse both Java and Javascript code with the Maven scanner.
In your case adding
<properties>
<sonar.sources>src/js</sonar.sources>
</properties>
to the dolphinscheduler-ui/pom.xml should make the the analyser detect your Javascript files as well.
Hope that helps,
Tom
Thanks!
I wouldn’t reccomend doing that in this case – as it will apply to all modules (and that’s why you’re getting the funky paths).
If you have a pom.xml for the /frontend/ directory (I think when you say They are declared in the root pom.xml that means yes), you can adjust sonar.sources specifically for that module.
<properties>
<sonar.sources>component</sonar.sources>
</properties>
butammu
(Budha)
March 14, 2024, 5:42am
3
Thank you,
After adding the <sonar.sources>src</sonar.sources>, both java and javascript scan working for us.
1 Like