Use java 8 conventions with checkStyle

I am looking to apply some best practices for Java 8 using checkStyle, some examples include:

  • Do not install additional options
  • Limit lambdas to x lines if it is in the middle of stream conversions
  • General warning against parallel flow

Based on my research, I see that checkStyle supports java 8, but nothing special to enforce standards for functions.

Is this something affordable?

Thank you for your help.

+6
source share
1 answer

If checkstyle supports it out of the box, it will be indicated in the standard check that checkstyle comes with (I did not see anyone when I looked around, unfortunately). If it’s not on this list, I would start looking at third-party best-selling libraries (for example, SevNTU Checkstyle , Checkstyle Addons and CS-Contrib among them) to find out if you can find checks that suit your requirements. necessary. If you still cannot find anything, you may need to implement checks . If you do, you can consider contributing them to the community, receiving eternal gratitude from users of control samples around the world.

+3
source

All Articles