-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Issue #13758: Fix documentation of pattern array #14764
Conversation
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.
Ok to merge
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.
I am not sure why this is split from #14740 . It seems they are inter-connected based on what is decided on the other PR. This change also being in that PR and discussed in this PR's first post seems to align with that.
If minds are changed in the other PR, it will impact this one.
@rnveach Sorry for the confusion. I think the changes in #14740 will be abondoned, based on the discussion #13758 (comment). I need to create a new PR with only documentation updated, and I will close #14740 once I confirm with @romani. We agree to only update the documentation for now. And leave the update for |
Documentation is still misleading as we don't support |
Even if we ignore #14764 (comment) , If this updated documentation is correct, please show that all current fake implementations follow it. This area is global documentation, so everything has to follow it otherwise the documentation is wrong. https://checkstyle.org/checks/imports/importorder.html#Properties
Wouldn't this mean this documentation is wrong since every group is a comma? Not really sure what a common prefix string is. |
Yes suggestion in issue is breaking compatibility. There is no break in #14740 which I see. |
Reply to #14764 (comment): By searching through GitHub link, I only see 3 checks using
They are separated by commas. However, these two properties are special, since they have a mix of plain string and regex expression. Because of that, these two properties require users to enclose regex expression with checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportOrderCheck.java Lines 747 to 777 in e30260d
IMO, this design is somehow over-engineering, since we can directly tell users to add a
|
ImportOrder is using comma separated list, and each element of it additionally special in interpretation, that is described in property description, so it is ok, not ideal design, but ok.
We can convert it to checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportOrderCheck.java Line 286 in e30260d
I am ok to change all such types to |
I think it is better to go with #14740 then confuse users between this being a string or a pattern. |
if property is simple patterns, so Pattern[] is not confusing. this is true list of Patterns: Lines 159 to 163 in e30260d
this is not list of Patterns, it is something special, lets keep it checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/imports/ImportOrderCheck.java Lines 747 to 759 in e30260d
we can merge few updates:
deal ? |
https://github.com/checkstyle/checkstyle/pull/14740/files is a simple pattern. If we need to change only
This is already a design problem before that PR, so that PR has no negatives and still the positive that we support what we say we do, |
ok as we agree on update in package, not individually @Lmh-java , please make such updates in one PR to make it sure that all updates will be done in same time and all see all changes together, they are not big changes, so single PR is fine. |
lets put all changes to #14740 |
Issue #13758: Fix documentation of pattern array
Reword documentation for
Pattern[]
as discussed in #13758 (comment)