// @formatter:off
periodFormatter = new PeriodFormatterBuilder()
.printZeroAlways()
.appendDays().appendSuffix("d ")
.appendHours().appendSuffix("h ")
.appendMinutes().appendSuffix("m")
.toFormatter();
// @formatter:on
Problem solved[1] - let's move on :-)
You can even configure checkstyle to pick up these comments to turn on/off
checkstyle.
[1] at the expense of some crufy in the code that is pretty easy to ignore.
On Monday, October 26, 2015 at 10:02:21 PM UTC, nigelm 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]
> <javascript:>> wrote:
>
>>
>>
>> On Mon, Oct 26, 2015 at 1:21 PM Stephen Connolly <[email protected]
>> <javascript:>> 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] <javascript:>.
>> 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 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/286490ff-5ad8-49a5-af41-da2bf0a7ff3b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.