Skip to content
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

Since version is not properly calculated in properties macros #14052

Open
romani opened this issue Nov 20, 2023 · 9 comments
Open

Since version is not properly calculated in properties macros #14052

romani opened this issue Nov 20, 2023 · 9 comments
Labels

Comments

@romani
Copy link
Member

romani commented Nov 20, 2023

detected at https://github.com/checkstyle/checkstyle/pull/14049/files#r1398641110

problem is that property was added in 8.3 version but check was added to 8.24.
Before when PropertyMacros calculate since value it should compare it with version of Module and if version of module is above then use it.

We can try to reuse https://stackoverflow.com/a/65077344/1015848 class to compare versions.

Versions from abstract classes should be used with caution #14048 (comment)

@romani
Copy link
Member Author

romani commented Nov 20, 2023

@aayushRedHat , can you help with this issue ?

@aayushRedHat
Copy link
Contributor

@aayushRedHat , can you help with this issue ?

Sure

@romani
Copy link
Member Author

romani commented Nov 20, 2023

I suspecting that whole

* Map of properties whose since version is different from module version but
* are not specified in code because they are inherited from their super class(es).
*/
private static final Map<String, String> SINCE_VERSION_FOR_INHERITED_PROPERTY = Map.ofEntries(
Map.entry("MissingDeprecatedCheck.violateExecutionOnNonTightHtml", V824),
Map.entry("NonEmptyAtclauseDescriptionCheck.violateExecutionOnNonTightHtml", "8.3"),
Map.entry("NonEmptyAtclauseDescriptionCheck.javadocTokens", "7.3"),
Map.entry("FileTabCharacterCheck.fileExtensions", "5.0"),
Map.entry("LineLengthCheck.fileExtensions", V824),
Map.entry("ParenPadCheck.option", "3.0"),
Map.entry("TypecastParenPadCheck.option", "3.2")

is present only due to this defect.

@rnveach
Copy link
Member

rnveach commented Nov 20, 2023

is present only due to this defect.

Even so, this workaround must stay because even this method can fail.

@romani
Copy link
Member Author

romani commented Nov 20, 2023

yes, but we can significantly shrink content of this collection.

Map.entry("MissingDeprecatedCheck.violateExecutionOnNonTightHtml", V824)

is same problem as issue description, we should be able to remove it in scope of this issue.

@relentless-pursuit
Copy link

Hi @romani, any progress here? Are we still facing the issue?

@romani
Copy link
Member Author

romani commented Feb 4, 2024

Still a problem, load of PRs is too big to let me do any coding, please help to fix this issue.

@relentless-pursuit
Copy link

Still a problem, load of PRs is too big to let me do any coding, please help to fix this issue.

Sure, will start shortly, after making some decent progress on pending PRs.

@relentless-pursuit
Copy link

I won't be able to continue my work on this PR, as I am busy with other open PRs, and following up with one of the GSOC projects. I will surely combeback to this once later, if not been taken by anybody else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

4 participants