Re: [hibernate-dev] Checkstyle and ORM

2015-05-16 Thread Sanne Grinovero
One nice thing of checkstyle is that it's easily extended, for example in Search we added a couple of checks, like to ban double whitespaces: - https://github.com/hibernate/hibernate-search/blob/master/build-config/src/main/java/org/hibernate/checkstyle/checks/regexp/DoubleSpacesCheck.java Or to

Re: [hibernate-dev] AvailableSettings#USE_NEW_ID_GENERATOR_MAPPINGS

2015-05-16 Thread Sanne Grinovero
On 15 May 2015 at 23:55, Steve Ebersole wrote: > The problem is legacy databases and how to help users migrate the id > generation strategies. Or are you thinking that existing users would have > to disable this on upgrade? I would expect that yes. Or is there no reasonable benefit in using the

Re: [hibernate-dev] AvailableSettings#USE_NEW_ID_GENERATOR_MAPPINGS

2015-05-16 Thread Steve Ebersole
>From a performance and maintainability perspective I think there is a big win in moving to the new generators. But the problem is people migrating and the change in expectations. 2 specific examples: 1) User migrating where the legacy code picked "identity" generation. The new code would pick

Re: [hibernate-dev] Checkstyle and ORM

2015-05-16 Thread Steve Ebersole
Yes, we use FindBugs too; I will start a discussion about it after this. I wanted to do CheckStyle first because its easier to work with IMO. And yes we use FindBugs because there are thins it can do that CheckStyle just cannot (like checking for the use of non-localized String#toUpperCase/toLowe

Re: [hibernate-dev] Checkstyle and ORM

2015-05-16 Thread Steve Ebersole
Actually a few others I will add: 3) missing @Override 4) missing @Deprecated/@deprecated 5) missing braces 6) star imports 7) redundant imports 8) lower case 'l' for long literals (upper case is much more readable) 9) missing newline at end of file On Sat, May 16, 2015 at 1:18 PM, Steve Ebersol

Re: [hibernate-dev] Checkstyle and ORM

2015-05-16 Thread Steve Ebersole
Sanne, can you give me the low-down on this line? On Sat, May 16, 2015 at 1:26 PM, Steve Ebersole wrote: > Actually a few others I will add: > > 3) missing @Override > 4) missing @Deprecated/@deprecated > 5) missing braces > 6) star imports > 7) redundant imports > 8) lower case 'l' for long l