> Both will be acceptable in styling. That lines are about logic that
> analysing tool can’t know.
>

​Bingo.

"Automatic code formatters"​ don't know the semantics of what they're
formatting, so you apply them end up with gigantic concatented lines
(sometimes split to 80 columns, as if we're still producing punched cards).

This is clearly worse than the "unformatted" case - where the author has
carefully aided the maintainer by splitting on semantically distinct
sections.

By all means, have some IDE defaults that can be picked up (e.g: spaces or
tabs, tabstops, whether to use '*' imports or not), but auto-code
formatters are evil.


> or
> periodFormatter = new PeriodFormatterBuilder().printZeroAlways()
> .appendDays().appendSuffix("d ").appendHours().appendSuffix("h ")
>                 .appendMinutes().appendSuffix("m").toFormatter();
> <——— scroll ——---->
>
> P.S. Am i alone who receives emails from Nigel with small blue font?
>


On Oct 27, 2015, at 01:02, Nigel Magnay <[email protected]> wrote:
>
> You don't need to trial automatic code formatting it to know it's going to
> produce a terrible result.
>
> Trivial example 101. Which is the more easily parseable to the human eye?
>
> periodFormatter = new PeriodFormatterBuilder()
>                 .printZeroAlways()
>                 .appendDays().appendSuffix("d ")
>                 .appendHours().appendSuffix("h ")
>                 .appendMinutes().appendSuffix("m")
>                 .toFormatter();
>
> or
>
> periodFormatter = new PeriodFormatterBuilder().printZeroAlways()
> .appendDays()
>                           .appendSuffix("d ").appendHours().appendSuffix("h
> ")
>                           .appendMinutes().appendSuffix("m")
> .toFormatter();
>
>
> I know which I'd rather be faced with when maintaining code.
>
> On Mon, Oct 26, 2015 at 9:55 PM, Mark Waite <[email protected]>
> wrote:
>
>>
>>
>> On Mon, Oct 26, 2015 at 1:21 PM Stephen Connolly <
>> [email protected]> wrote:
>>
>>> I think that the best way to do this is via an experiment in plugins...
>>> If we get a critical mass of plugins adopting a mostly similar set of rules
>>> then and only then should we think about applying them to core
>>>
>>>
>> I volunteer to experiment with a branch of the git client plugin as a
>> first candidate.  I'd limit the formatting to newer files and files that
>> I've created myself so that the "diff wall" won't be as difficult.  Older
>> files with wildly divergent formatting styles will remain that way as part
>> of the first phase of the experiment.
>>
>> That will give a chance to evaluate Nigel's concern for the impact on
>> fluent API calls (since there are several fluent interfaces in the git
>> client plugin).
>>
>> Mark Waite
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Jenkins Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jenkinsci-dev/CAO49JtHbxMpH1RTwRMiYuDj71pVi1fTSsUFbHTpEh%3DeYGMNezg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/jenkinsci-dev/CAO49JtHbxMpH1RTwRMiYuDj71pVi1fTSsUFbHTpEh%3DeYGMNezg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Developers" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/jenkinsci-dev/8fjvXGYbFJ4/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-dev/CAPYP83TJO306gyDmEt_fVx88XVZK54gK7O3JhxqSFzDgLrn6Xg%40mail.gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-dev/CAPYP83TJO306gyDmEt_fVx88XVZK54gK7O3JhxqSFzDgLrn6Xg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-dev/FF20FA21-AF8B-46EE-B8DF-10A9DEBA8921%40gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-dev/FF20FA21-AF8B-46EE-B8DF-10A9DEBA8921%40gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAPYP83Q73VNYKWJWX2iP_0QA9z%3Dy%3DpbDPBHMy0tQJ%2BX6Ley1Ng%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to