[hibernate-dev] Sharing IDE code styles

Gunnar Morling gunnar at hibernate.org
Tue May 19 11:21:11 EDT 2015


+1 for having the style(s) in Git.

There is another axis, though, which is the used IDE. So far we couldn't
find a way to make Eclipse and IntelliJ do exactly the same thing wrt.
formatting. There is just not the exact same set of options available in
both IDEs, so outputs will always differ a bit.

But I don't think it's a big problem as long no one re-formats entire files
just for the sake of it. And if explicit formatting changes are needed for
whatever reason, they should go in dedicated commits independently from
actual code changes. Reviewing is otherwise a pain.



2015-05-19 17:07 GMT+02:00 Steve Ebersole <steve at hibernate.org>:

> My thinking was more about how to find which one supersedes which others.
> If I (as a contributor) have a few of these code style files available to
> me from the Hibernate team, how do I know which is the latest?
>
> As I pointed out, I actually had to update my code style slightly after
> migrating to 14 because it was inadvertently introducing leading spaces
> rather than tabs in certain cases.  Which illustrates that there are really
> 2 axis in play here, the targetted version of IDE and the version of the
> code style.
>
> Anyway, this is what got me thinking that using git might be nice for this,
> and GitHub could make it centrally available.
>
>
> On Tue, May 19, 2015 at 9:40 AM, Hardy Ferentschik <hardy at hibernate.org>
> wrote:
>
> > Hi,
> >
> > Hibernate Validator used initially the same style as ORM. I am saying
> used
> > to since the file attached to this url -
> > http://hibernate.org/validator/contribute/ -
> > seems to differ a fair bit from the file you are referring to.
> > A lot of the difference might just be indentation and re-ordering issues.
> > After all
> > your version is hibernate-style-steve-2.xml. My guess is that the
> > Validator style is
> > derived from hibernate-style-steve-1.xml :-)
> >
> > Either way, differences should not be so huge.
> >
> > --Hardy
> >
> > On Mon, May 18, 2015 at 10:01:28PM -0500, Steve Ebersole wrote:
> > > The recent discussion on Checkstyle got me thinking about best ways to
> > > share/distribute code styles for IDE setup.  Storing them in the
> project
> > > itself is not very workable for IntelliJ at least.  I started thinking
> > > about a separate repository under the hibernate GitHub organization.
> > Does
> > > everyone use the code style I attached to
> > > https://developer.jboss.org/wiki/ContributingToHibernateUsingIntelliJ,
> > or
> > > do y'all use custom versions of that?
> > >
> > > Do y'all think it makes any sense to do this?
> > > _______________________________________________
> > > hibernate-dev mailing list
> > > hibernate-dev at lists.jboss.org
> > > https://lists.jboss.org/mailman/listinfo/hibernate-dev
> >
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>


More information about the hibernate-dev mailing list