Skip to content

Conversation

@stokpop
Copy link
Collaborator

@stokpop stokpop commented Jul 21, 2025

This builds on top of the master-activate-kotlin-sensor branch and is work-in-progress.

This solves #361

This is a working version with Apex PMD rules. You can try it out if you download the zip file of the PR build.

There is unfinished work:

  • a default Apex profile is added called "Sonar way" with just a limited set of rules activated -> how to name this profile and what rules to include?

Found out there is also a Sonar Apex plugin, so that will probably define a Sonar way and also the Apex language. E.g. see apex:AS3923 violation on our integration test.

Sonar Apex rules are part of the Enterprise Edition, so not all users will have the parent Apex Sonar plugin. How to deal with language and initial Apex profile? Can be done conditional?

  • should we make a distiction between main and test rules?

We can now add tests tag for test only. Which Apex rules apply? Can maybe be mapped automatically based on message?

  • resulting jar is too big (50MB+), re-check dependencies

It is still bigger that Java/Kotlin, but maybe Apex just needs more jars. It is now 41MB.

stokpop added 14 commits July 3, 2025 17:04
# Conflicts:
#	scripts/pmd7_rules_xml_generator.groovy
#	sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdTemplate.java
# Conflicts:
#	scripts/pmd7_rules_xml_generator.groovy
# Conflicts:
#	pom.xml
#	sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/AbstractPmdExecutor.java
#	sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdPlugin.java
#	sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdSensor.java
#	sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdPluginTest.java
#	sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdSensorTest.java
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
B Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@jborgers jborgers modified the milestone: 4.2.0 Aug 29, 2025
Base automatically changed from master-activate-kotlin-sensor to master September 3, 2025 16:02
# Conflicts:
#	integration-test/pom.xml
#	integration-test/src/test/java/com/sonar/it/java/suite/PmdIT.java
#	integration-test/src/test/java/com/sonar/it/java/suite/PmdKotlinIT.java
#	integration-test/src/test/java/com/sonar/it/java/suite/TestUtils.java
#	integration-test/src/test/java/com/sonar/it/java/suite/orchestrator/PmdTestOrchestrator.java
#	pom.xml
#	scripts/pmd7_rules_xml_generator.groovy
#	sonar-pmd-plugin/pom.xml
#	sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdConstants.java
#	sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdPlugin.java
# Conflicts:
#	integration-test/src/test/java/com/sonar/it/java/suite/PmdIT.java
@stokpop stokpop mentioned this pull request Oct 12, 2025
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants