-
Notifications
You must be signed in to change notification settings - Fork 98
SCANGRADLE-324 Centralize Sonar property names in ScanPropertyNames #405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+221
−90
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
romainbrenguier
commented
Nov 21, 2025
Move all Sonar property name string constants from SonarPropertyComputer, SonarUtils, and AndroidUtils to ScanProperties for better maintainability. Changes: - Add all property name constants to ScanProperties with appropriate comments - Organize constants by category (general, project structure, sources, Java, Groovy, Kotlin, test reports, coverage, Android) - Mark backward compatibility properties as @deprecated - Update all references to use the centralized constants 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Rename the class to better reflect its purpose as a container for property name constants rather than actual properties. Changes: - Rename ScanProperties class to ScanPropertyNames - Update all references throughout the codebase - Update class constructor 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Replace string literals with centralized constants for library properties in SonarTask class. Changes: - Add deprecated LIBRARIES constant to ScanPropertyNames - Import and use JAVA_LIBRARIES and LIBRARIES constants in SonarTask - Improve code formatting for property key assignments 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Replace remaining string literals with centralized constants for test library and binaries properties. Changes: - Import JAVA_BINARIES and JAVA_TEST_LIBRARIES constants - Replace string literals in test classpath resolution - Improve code formatting consistency 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Replace string literal for sonar.verbose property with centralized constant. Changes: - Add VERBOSE constant to ScanPropertyNames - Import and use VERBOSE in SonarTask debug logging 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Add class-level documentation to clarify the purpose of ScanPropertyNames as a container for SonarQube scan property name constants. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
This two classes have similar names, so it's important to have documentation clearly explaining their purpose.
Although they are deprecated for users of the scanner, we still need to include them for backward compatibility, so they should not be removed and not be marked as deprecated.
213dff8 to
974e42d
Compare
erwan-serandour
approved these changes
Nov 24, 2025
Contributor
erwan-serandour
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.




Centralize Sonar property names in ScanPropertyNames
Summary
This PR refactors the codebase to centralize all SonarQube property name string constants in a single
ScanPropertyNamesclass, improving code maintainability and reducing duplication.This is in preparation for a broader clean-up of SonarPropertyComputer.