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

How the 4.4 Column Limit: 100 rule works for JSNI Method Reference? #808

Open
Zopsss opened this issue Mar 14, 2024 · 0 comments
Open

How the 4.4 Column Limit: 100 rule works for JSNI Method Reference? #808

Zopsss opened this issue Mar 14, 2024 · 0 comments
Labels
lang:java The Java language

Comments

@Zopsss
Copy link

Zopsss commented Mar 14, 2024

Hey, I'm a contributor at Checkstyle. I was working on this issue to add support for detecting JSNI method for rule 4.4 Column Limit: 100. I made a PR regarding this issue, but there I got stuck on how we should approach this issue. Initially I discussed with the maintainers and we came up with the idea of ignoring the column limit for whole JSNI method declaration for this rule. You can take a look at this file for better understanding how we are ignoring JSNI methods for this rule: https://github.com/checkstyle/checkstyle/blob/40934dddede18b5f004f678f6704a84e32847cb2/src/it/resources/com/google/checkstyle/test/chapter4formatting/rule44columnlimit/InputLineLengthJsniMethods.java

Lines where obeying the column limit is not possible (for example, a long URL in Javadoc, or a long JSNI method reference).

But as you can see google style guide says we only need to ignore the long JSNI method references. One of the maintainer suggested that the JSNI method reference is wrap-able so why there is a need to ignore JSNI reference for this rule when we can wrap it to make it under the column limit?

Here is the conversation link for your reference. Can anyone explain us how the Column Limit rule should work for JSNI Methods? Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang:java The Java language
Projects
None yet
Development

No branches or pull requests

2 participants