Sonar-Fix: Extract duplicated "error" string literal into constant#1
Open
meysholdt wants to merge 10 commits into
Open
Sonar-Fix: Extract duplicated "error" string literal into constant#1meysholdt wants to merge 10 commits into
meysholdt wants to merge 10 commits into
Conversation
- Add .ona/mcp-config.json with SonarQube MCP server configuration - Add SonarLint and Node.js to devcontainer, preserving upstream features - Remove unused Dockerfile in favor of upstream base image - Update README with SonarQube Cloud setup instructions Co-authored-by: Ona <no-reply@ona.com>
Install SonarScanner CLI 6.2.1 in a custom Dockerfile and switch devcontainer.json from image to build. Document CLI and SonarLint usage in README. Co-authored-by: Ona <no-reply@ona.com>
Configure sonar-maven-plugin 5.1.0 in pom.xml to enable running scans via ./mvnw sonar:sonar. Co-authored-by: Ona <no-reply@ona.com>
Define init (build) and run (spring-boot:run) automation tasks matching the spring-petclinic reference configuration. Co-authored-by: Ona <no-reply@ona.com>
Co-authored-by: Ona <no-reply@ona.com>
Co-authored-by: Ona <no-reply@ona.com>
Co-authored-by: Ona <no-reply@ona.com>
cf938b4 to
4a3036a
Compare
Co-authored-by: Ona <no-reply@ona.com>
…nto constant Co-authored-by: Ona <no-reply@ona.com>
4a3036a to
58695ef
Compare
|
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
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.



SonarQube Issue
java:S1192— View ruleWhat changed
Extracted the duplicated
"error"string literal inOwnerControllerinto aprivate static final String FLASH_ATTR_ERRORconstant and replaced all three usages. This satisfies rule S1192 by ensuring the literal is defined once, reducing refactoring risk.Verification
./mvnw compile testpasses