On Fri, Aug 13, 2010 at 10:57 AM, Glenn Adams <gl...@skynav.com> wrote:
> 3. Adjust the Checkstyle profile to allow "log" and disallow whitespace >> before and after parantheses. Then remove "log"-related //CS constants >> and excessive whitespace. >> > > I would not agree to restricting the style rules to prohibit whitespace > before/after parentheses. I prefer *always* using whitespace around parens > in Java (and C/C++). > Allow me to expand on this. I can accept such a rule (for prohibiting whitespace before/after parens), but only if it is accepted that CSOFF be used to disable that rule globally in the files of which I am the original author. That is, I could agree to enforce and use that rule on files I did not author, as long as I can avoid using that rule on the files I author. By the way, this is precisely why there are going to always be limits to obtaining consensus on style rules, particularly on those that are the most stylistic in nature, of which I would suggest that whitespace distribution will remain the most subjective. What to do in such a case? Either don't impose the rule at all, or impose it as a default while allowing overrides for those that do not concur. There may indeed be some core set of rules where there is a true consensus on application and enforcing, some of which may be related to whitespace. For example, should tabs be permitted? Even though my editor can handle that with appropriate embedded comments in the code, it is undesirable, and not everyone uses the same editor. So best stay with NO TABS. On the other hand, there are other possible rules for which a unanimous consensus will be impossible, and for those, we can only not employ the rule or employ it *merely* as a default, allowing overrides. You will also now notice that we have descended onto that slippery slope of discussing subjective preferences about style rules. I hope we can climb off that slope soon and finish this patch in order to progress with useful features. G.