-
-
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
GenericWhitespaceCheck: Handling of whitespace between generic and record header #14502
Comments
In my opinion, whitespace between generic and record header should be considered as a violation, only contradicting thing that I have encountered so far is that single example in the oracle docs. |
yes, issue is approved |
I am on it. |
sktpy
added a commit
to sktpy/checkstyle
that referenced
this issue
Feb 23, 2024
…cord header (GenericWhitespaceCheck)
sktpy
added a commit
to sktpy/checkstyle
that referenced
this issue
Feb 23, 2024
…cord header (GenericWhitespaceCheck)
sktpy
added a commit
to sktpy/checkstyle
that referenced
this issue
Feb 24, 2024
…cord header (GenericWhitespaceCheck)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From #14497 (comment) (second last paragraph)
(Check Documentation)
Goal of this Issue:
How it works Now:
Currently whitespace between generic and record header is not considered a violation.
Test.java
config.xml
Current CLI Execution:
Expected Working:
To be decided[ERROR] Test.java:1:14: '>' is followed by whitespace. [GenericWhitespace]
Findings that may be useful:
Typical Usages of Generic Records (Anecdotal):
This can be verified by running the following two grep cmds:
grep -P -r "record [a-zA-Z0-9\s$_]+\<.*\>\(.*\)" dir/ | tee >(wc -l)
grep -P -r "record [a-zA-Z0-9\s$_]+\<.*\>\s+\(.*\)" dir/ | tee >(wc -l)
32
; ii:0
60
; ii.0
Side note: Arguably better way to verify that there are no such cases would be implement changes which detects space between generic and record header as a violation, and then check for differences in the report. (lmk if that is needed)
The text was updated successfully, but these errors were encountered: