Hello Michael, Adapting checkstyle configuration is less impacting to our codebase but make us stay different from the java standard. That is the easier path, that will not affect code history.
But about getting nearer from the java standard is IMO a nice to have, to make pure java developer feel better discovering OFBiz. I'm kinda prefer the "opposite approach", but we need to discuss if this improvement is worth the history lost. In the example you chose, i see no issue capitalizing module, resource and other. Updating the rule offer the ability to write a constant like : MoDuLe :-). Lots of errors are about line that are 120+ length, missing or uneeded space etc. So that will lead to loads of unrisky modifications. With the usage of IDE with checkstyle plugin this can be done nicely. I check that over the near thousand of java file concerned more than 80% have less than 50 issue... So we can focus our effort onto the big files using a branch to test the idea and ease the issue. And like Daniel said, it is a good subject for a community week effort. I'd really like to be able to efficiently use this feature, in one way or the other, so thank you for starting this discussion. Regards, Gil On Thu, Feb 13, 2020 at 05:44:40PM +0100, Michael Brohl wrote: > Hi *, > > checkstyle currently reports a huge amount of errors. We currently have an > error count setup in the configuration to prevent the build from failing > because of the present errors. > > Some thoughts/questions to the community: > > * should we take an approach to fine-tune theĀ configuration so that it > better fits the project style? > > As an example, constants are currently not allowed to be named "module", > "resource" etc. which is a common pattern in our code. Changing from > ^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$ to ^[a-zA-Z][a-zA-Z0-9]*(_[a-zA-Z0-9]+)*$ > would allow the common naming. > > The opposite approach would be to rename those to fit the default settings. > > * should we start an initiative to remove the valid errors like we did with > the FindBugs initiative some time ago? > > > Thanks for your feedback, > > Michael Brohl > > ecomify GmbH - www.ecomify.de > >
signature.asc
Description: PGP signature
