Skip to content

SONARJAVA-6121 : Fix FP for rule S2694 raising on compact source files#5465

Merged
rombirli merged 5 commits intomasterfrom
rombirli/SONARJAVA-6121-fix-FP-S2694-on-compactsourcefile
Feb 23, 2026
Merged

SONARJAVA-6121 : Fix FP for rule S2694 raising on compact source files#5465
rombirli merged 5 commits intomasterfrom
rombirli/SONARJAVA-6121-fix-FP-S2694-on-compactsourcefile

Conversation

@rombirli
Copy link
Copy Markdown
Contributor

No description provided.

@hashicorp-vault-sonar-prod
Copy link
Copy Markdown
Contributor

hashicorp-vault-sonar-prod Bot commented Feb 16, 2026

SONARJAVA-6121

@rombirli rombirli marked this pull request as ready for review February 16, 2026 12:39
void test() {
CheckVerifier.newVerifier()
.onFile("src/test/files/checks/InnerStaticClassesCheckSample.java")
.onFile(nonCompilingTestSourcesPath("checks/InnerStaticClassesCheckSample.java"))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it non-compiling? I think it should be regulat mainCodePath (or whatever the name was). Same below.

Copy link
Copy Markdown
Contributor Author

@rombirli rombirli Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After the first commit the Build and Unit Test on Windows failed because the sample file couldn't be parsed, that's why I moved this sample into non-compiling test source files in the second commit (see commit history)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved it. PTAL. We can use either location for the existing sample. As for compact source file, your sample compiles, so it should be in mainCodeSourcesPath

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Feel free to revert my commit.

@sonarqube-next
Copy link
Copy Markdown

@rombirli rombirli merged commit e9e93bd into master Feb 23, 2026
14 checks passed
@rombirli rombirli deleted the rombirli/SONARJAVA-6121-fix-FP-S2694-on-compactsourcefile branch February 23, 2026 09:55
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