Let me explain where I'm arriving from. At CXF and XmlSchema (at Apache) plus on some projects I cloned from them, there is:
a checkstyle.xml with checkstyle rules. a pmd XML file with PMD rules and a set of eclipse configuation settings. They all agree. if you format the code with Eclipse (for format) or run the code cleanup wizard in Eclipse (for other things), the output passes the rules, and the plugins for eclipse for these tools use the same rules. I'm not a propagandist for these particular settings, but they do have the virtue of working both in the maven build and in the Eclipse IDE. I was a bit surprised to see how few indentation settings are supported by checkstyle. It could be that a bit of further tweaking of those three setting would make them match up with the Lucene conventions, and all would be happy. Can someone post the lucene indentation settings in some abstract sense that I could cogitate over while studying the checkstyle doc. On Fri, Jul 17, 2009 at 8:36 AM, Sean Owen<sro...@gmail.com> wrote: > Yeah I think the point would be to make sure this happens > automatically. I too am wary of maintaining 2, 3, 4 style > configurations for the project. > > But while I use an IDE almost exlcusively (IntelliJ), I am not sure I > agree that the project should assume an IDE, and therefore, there is > some point in a style-enforcement system that is not related to > Eclipse or IntelliJ. Indeed we have gone to the trouble of maintaining > an Ant or Maven build (we make only the weaker assumption that you > have Ant or Maven, not a particular IDE) rather than express the build > in terms of IDE config, which we could surely do. (And I don't want to > do that since I will never never use Eclipse! Ant and Maven are > neutral territory in the IDE wars.) > > In practice, the standards that are suggested for Lucene are so > trivial that it doesn't seem painful to add a checkstyle version of > the rules. The rules basically say "2 spaces for each unit of indent" > and little more. > > So yes, of course, we should not adopt conventions different from > Lucene, and aren't. I think the remainder of Lucene's conventions, as > I understand them, are "whatever the Sun conventions are", which are > indeed my personal defaults, industry standards, usually IDE defaults, > and checkstyle defaults it seems. So I think we are all strongly on > the same page. > > Sean > > On Fri, Jul 17, 2009 at 1:29 PM, Grant Ingersoll<gsing...@apache.org> wrote: >> >> On Jul 17, 2009, at 7:31 AM, Benson Margulies wrote: >> >>> So, would you smile on a patch that whomped all the indents to be >>> acceptable to this and automated setting eclipse settings? I don't >>> know about IntelliJ. >> >> FWIW, I see no point in a tool that can't be replicated in an IDE. Or is >> this something that is going to happen automatically? I know Hadoop has >> automations for these. >> >> Also, we have >> http://cwiki.apache.org/MAHOUT/howtocontribute.html#HowToContribute-HelpfulResources styles, >> does this stuff conform to those? Those two are the standards across many >> of the Lucene projects and I think it makes sense for us to replicate. >> Selfishly speaking, I don't want to have to remember to switch between code >> styles as I have Lucene set as my default codestyle for everything I do. >> >> -Grant >> >