Code Monkey home page Code Monkey logo

Comments (10)

nrmancuso avatar nrmancuso commented on September 20, 2024 4

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.

rnveach avatar rnveach commented on September 20, 2024 1

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.

apflieger avatar apflieger commented on September 20, 2024 1

PatternVariableName doesn't allow unnamed variables by default.

from checkstyle.

romani avatar romani commented on September 20, 2024

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.

romani avatar romani commented on September 20, 2024

@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.

nrmancuso avatar nrmancuso commented on September 20, 2024

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.

nrmancuso avatar nrmancuso commented on September 20, 2024

Another issue that could be considered for this: #14825

from checkstyle.

nrmancuso avatar nrmancuso commented on September 20, 2024

Parenpad for record pattern def: https://checkstyle.sourceforge.io/checks/whitespace/parenpad.html#ParenPad

from checkstyle.

nrmancuso avatar nrmancuso commented on September 20, 2024

@mahfouz72 please confirm that we have covered all that is mentioned here in our tracker issues, then I will close this.

from checkstyle.

mahfouz72 avatar mahfouz72 commented on September 20, 2024

@nrmancuso All items mentioned here are covered by the tracker issues. We can close this issue

from checkstyle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.