Comments (10)
We unlikely to change default behavior to keep compatibility with previous behavior.
I tend to disagree here. We need to evolve, checks should reflect today's best practices and styles by default, not best practices from 10/15/20 years ago. Checkstyle should be leading the community in best practices.
Imagine you are a brand new user with a Java 21 project; you will need to go through a bunch of pain to configure your checks to follow modern practices. I would expect the latest version of any tool to support modern Java paradigms, with up to date syntax and and contemporary style.
On the other hand, I would also expect to have to do some minor updates to my config over the lifetime of a 15 year old project.
from checkstyle.
For unnamed variables:
One check needs to be Indentation. It has to execute on all tokens otherwise things are "hidden" from it. IllegalToken should support it, if it doesn't already.
NoWhitespace After/Before should be considered. Maybe WhitespaceAround should support it.
from checkstyle.
PatternVariableName doesn't allow unnamed variables by default.
from checkstyle.
We unlikely to change default behavior to keep compatibility with previous behavior. Please feel free to customize allowed pattern in your config. If think that it is very reasonable to have it by default , please create separate issue and share all details there.
from checkstyle.
@nrmancuso or @apflieger, please create new issue, to discuss exact code and check and reasoning of changing default.
We traditionalally keep compatibility, rather than change behavior in new releases. But in new issue it will be a way better see all details and vote on exact update.
from checkstyle.
Yup, this is issue is just a convenient place to easily drop ideas. We will analyse what we come up with here and generate comprehensive issues when the time is right.
from checkstyle.
Another issue that could be considered for this: #14825
from checkstyle.
Parenpad for record pattern def: https://checkstyle.sourceforge.io/checks/whitespace/parenpad.html#ParenPad
from checkstyle.
@mahfouz72 please confirm that we have covered all that is mentioned here in our tracker issues, then I will close this.
from checkstyle.
@nrmancuso All items mentioned here are covered by the tracker issues. We can close this issue
from checkstyle.
Related Issues (20)
- Reduce performance threshold value HOT 1
- Add EmptyCatchBlock module usage for section 6.2 Caught exceptions: not ignored in google style coverage page HOT 1
- InputEqualsHashCodeEqualsParameter.java has wrong location of violation comments HOT 15
- Indentation module question HOT 4
- Rename LINKS_FROM_PR to DIFF_PROJECTS_LINK for diff-report.sh
- UnnecessaryParenthesesCheck does not flag unnecessary parentheses in conditional expression HOT 3
- Add Support for Switch Statement Colon Syntax in WhenShouldBeUsedCheck
- Potential Typo in Running > Command Line > Usage by Classpath Update HOT 4
- Add Check Support for Java 21 Pattern Matching for Switch Syntax: IllegalToken HOT 1
- Add Check Support for Java 21 Record Pattern Syntax: IllegalToken HOT 1
- Add Check Support for Java 21 Unnamed Variables & Patterns Syntax: IllegalToken HOT 1
- Add Check Support for Java 17 Sealed Classes: IllegalToken HOT 1
- Add Check Support for Java 17 Sealed Classes: WhitespaceAround HOT 1
- UnnecessaryParenthesesCheck Fails to Detect Inner Nested Unnecessary Parentheses HOT 1
- NeedBraces Check Should violate Switch Expressions with Arrow Syntax That Directly Yields a Value HOT 3
- Enforce preceding line break for opening braces of a coding block in google_checks.xml HOT 6
- Finalize coverage table for google style on state on July 2024 HOT 1
- Investigating incorrect indentation by google-java-formatter HOT 4
- False positive for horizontal spacing in empty pair of curly braces HOT 3
- create "Correct" files for Indentation HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from checkstyle.