On Sun, Feb 14, 2010 at 11:32 AM, Robin Anil <robin.a...@gmail.com> wrote:
> On Mon, Feb 15, 2010 at 12:45 AM, Sean Owen <sro...@gmail.com> wrote: > > > I looked at the result and it seems a fair bit more happened. I don't > > mind line rewrapping in javadoc, or putting newlines after <p>, though > > I do tend to think those are noise changes not worth applying. > > > > I don't know if we ever talked about minor stuff like, do java.* > imports go first or last. But we seemed to have had a convention > going, and every file got reversed. That doesn't seem worthwhile. > > These are part of the Lucene Code formatter. Taken from the Lucene wiki. > Mahout version just cleans up method definitions but sticks to the lucene > version. In general, I am a big "-1" to blindly applying the Lucene code formatter. It's going to go and do a bunch of stuff like this (unimportant reorderings of imports, etc). > > But why are all static references qualified now? like, all "log" lines > > are now "MyClass.log(...)" That doesn't seem right to me at all. Lots > > of code is less readable and running well over 120 columns. > > > > return 2.0 * (LogLikelihoodSimilarity.logL(k1 / n1, k1, n1) > > + LogLikelihoodSimilarity.logL(k2 / n2, k2, n2) - > > LogLikelihoodSimilarity.logL(p, k1, n1) - LogLikelihoodSimilarity > > .logL(p, k2, n2)); > > > > > > > This. I am looking. Can be an easier fix than rolling back. > Yeah, this I noticed too, and it was pretty annoying. There's no reason for referencing static methods in the same class/subclasses like this. In fact, I actually prefer, in certain specialized cases, to doing the anathema of "import static", when there's a bunch of useful methods or stateless static class instances which are easy to read without the reference (for example: v.assign(otherVector, plus); - pretty obvious what it means, and your IDE can follow in one meta-click to the definition of Functions.plus if you really need to see it). > Take a look at the checkstyle too. If we make that as the > target standardization, then there wont be any issue going forward. If > checkstyle says ok, the code should be ok. > I think we've got enough negative votes toward mass application of checkstyle formatting, yes? -jake