Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Eric Sosman Newsgroups: comp.lang.java.programmer Subject: Re: Style Police (a rant) Date: Mon, 29 Aug 2011 20:50:20 -0400 Organization: A noiseless patient Spider Lines: 30 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 30 Aug 2011 00:50:58 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="f8igmItKsWs6nM5YanFxAA"; logging-data="27361"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Ilt12fVjFDxQW9AyOkRGa" User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0) Gecko/20110812 Thunderbird/6.0 In-Reply-To: Cancel-Lock: sha1:TEDbA+4k3qXhP8OCmpTONT87Dcg= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:7488 On 8/29/2011 9:11 AM, Tim Slattery wrote: > Eric Sosman wrote: > >> In recent days I've encountered a tool called "Checkstyle," that >> parses Java code and flags various departures from its baked-in rules. >> Some of these are worthwhile: It will whine if you override equals() >> without overriding hashCode(), it will shriek if a method's Javadoc >> omits a @param or @throws, it will moan if a static final field isn't >> ALL_CAPS, and so on. Some are less so: It insists that all method >> parameters should be final, it forbids the ?: operator, it tut-tuts >> at `x<< 8' for using a "magic number." > > Checkstyle checks exactly what you tell it to check in the config file > you tell it to use. Almost. It checks exactly what somebody tells it to check in the config file that somebody requires me to use. To be fair to the somebodies, I have yet to test just how slavishly they'll insist that I bow to their chosen dictates. Maybe the code that puts Checkstyle into such a tizzy will sail through review unscathed. Or maybe some gatekeeper will insist it "pass" Checkstyle before even getting as far as review; I honestly don't know yet. I'm just ranting at the absurdity of a criterion that says Object itself is "not designed for extension." -- Eric Sosman esosman@ieee-dot-org.invalid