commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Re: [all] Checkstyle and '+' should be on the previous line.
Date Mon, 03 Sep 2012 19:25:32 GMT
On Sep 3, 2012, at 14:13, Gilles Sadowski <gilles@harfang.homelinux.org> wrote:

> On Mon, Sep 03, 2012 at 09:59:55AM -0700, Phil Steitz wrote:
>> On 9/1/12 10:11 AM, Gary Gregory wrote:
>>
>> I have not tried using it, but the eclipse config that Luc posted
>> [1] includes this line, which I suspect configures this behavior:
>>
>> <setting
>> id="org.eclipse.jdt.core.formatter.wrap_before_binary_operator"
>> value="false"/>
>>
>> I am curious why you don't like it.  To me, it is similar to putting
>> the open paren for a method call on the preceding line.  Easier to
>> read for me at least.  Of course, in keeping with my normal "too
>> many rules == evil" view, I don't see it as something that needs to
>> be standardized :)
>
> One way to "explain" it: You would not write unary minus on the previous
> line:
>  double minusOne = -
>    1;

That makes sense for unary guys at least.

G

>
> Similarly, before one has become used to this (arbitrary) rule, this is as
> strange:
>  double xMinusOne = x -
>    1;
>
> [A rationale for writing parenthesis on the same line is that you can figure
> out more quickly that it is a method call, rather than a reference to a
> variable.]
>
>
> Gilles
>
>>
>> Phil
>>
>> [1] http://markmail.org/message/djnlefeodk2xa7bz
>>
>>> Hi All:
>>>
>>> Checkstyle can report warnings like:
>>>
>>> '+' should be on the previous line.
>>>
>>> FWIW, I'm not fond of this particular checkstyle rule.
>>>
>>> Does anyone know if the Eclipse formatter can be made to behave like this?
>>> I've not found such setting in the giant formatter options dialog. I am on
>>> Eclipse 3.7.2. Are there any 4.x users out there? If so, does 4.x deal with
>>> this?
>>>
>>> Thank you,
>>> Gary
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message