Skip to content

Conversation

@zsolt-kolbay-sonarsource
Copy link
Contributor

Fixes #7798

@sonarqubecloud
Copy link

@sonarqubecloud
Copy link

@mary-georgiou-sonarsource mary-georgiou-sonarsource changed the title Remove old runtime version checks SQ Plugin: Remove old runtime version checks Jul 25, 2024
Copy link
Contributor

@mary-georgiou-sonarsource mary-georgiou-sonarsource left a comment

Choose a reason for hiding this comment

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

I left a comment about a test that seems to still use version < 9.9.

Please also recheck again because I see there are more occurrences of Version.create( for versions < 9.9. For Example in CSharpPluginTest.getExtensions

assertThat(getSecurityStandards(Version.create(9, 4), PCI_DSS_RULE_KEY)).isEmpty();
}

@Test
Copy link
Contributor

Choose a reason for hiding this comment

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

What about this test?
Seems to be testing version 9.5.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The version number passed here is not used in our Java codebase, it's just passed to the Plugin API. So there's not much we can do about it. I removed the test for version 9.4, because the minimum API version is 9.9, but this test should still work. I could change the version number to 9.9, but it wouldn't matter; at least it shows from which version this feature is available.
The same is true for other occurrences I didn't remove: the runtime versions are passed to the API, and you can only see them in the code from the decompiled .class files. We cannot remove them.

Copy link
Contributor

@mary-georgiou-sonarsource mary-georgiou-sonarsource left a comment

Choose a reason for hiding this comment

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

LGTM

@mary-georgiou-sonarsource mary-georgiou-sonarsource merged commit 199988e into master Jul 25, 2024
@mary-georgiou-sonarsource mary-georgiou-sonarsource deleted the Zsolt/remove-old-version-checks branch July 25, 2024 13:50
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.

SQ Plugin: Remove the sonar runtime checks for versions prior 9.9

2 participants