Code formatting for COMMONS (was Re: [GitHub] commons-text issue #52: Test: Improved testcase coverage for StrBuilder)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Code formatting for COMMONS (was Re: [GitHub] commons-text issue #52: Test: Improved testcase coverage for StrBuilder)

Simon Spero
Is there a set of commons code formatting conventions? More particularly,
is there a machine readable file of same? I use intellij, so native,
checkstyle, or Eclipse is fine.

I've been having problems where I am doing the pre-commit diff check, and
find that I have made unintentional changes to whitespace, and which
intellij and I haven't figured the pattern to.

Checkstyle as plugin is still annoying, but only when we disagree :)

Simon

On Jun 18, 2017 2:33 AM, "PascalSchumacher" <[hidden email]> wrote:

Github user PascalSchumacher commented on the issue:

    https://github.com/apache/commons-text/pull/52

    Thanks!

    Please separate the formatting fixes and the test additions into
different commits.

    Please stick to the existing code style for the new tests (no new line
at the beginning and at the end of a test method; single new line between
test methods).



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Code formatting for COMMONS (was Re: [GitHub] commons-text issue #52: Test: Improved testcase coverage for StrBuilder)

Stefan Bodewig
On 2017-06-19, Simon Spero wrote:

> Is there a set of commons code formatting conventions? More particularly,
> is there a machine readable file of same? I use intellij, so native,
> checkstyle, or Eclipse is fine.

This probably would be something that was decided at the component level
and may be different between components. Some components may not have
any conventions at all - Compress is one such component for example:
http://commons.apache.org/proper/commons-compress/conventions.html

I don't see any conventions documented for Text either.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Code formatting for COMMONS (was Re: [GitHub] commons-text issue #52: Test: Improved testcase coverage for StrBuilder)

sebb-2-2
On 20 June 2017 at 15:07, Stefan Bodewig <[hidden email]> wrote:

> On 2017-06-19, Simon Spero wrote:
>
>> Is there a set of commons code formatting conventions? More particularly,
>> is there a machine readable file of same? I use intellij, so native,
>> checkstyle, or Eclipse is fine.
>
> This probably would be something that was decided at the component level
> and may be different between components. Some components may not have
> any conventions at all - Compress is one such component for example:
> http://commons.apache.org/proper/commons-compress/conventions.html
>
> I don't see any conventions documented for Text either.

AFAIK the only agreed upon Commons convention is NO TABS!

There are some other conventions here (not just formatting):

https://wiki.apache.org/commons/CodeStyle

If there is no documented convention, use the same convention as the
code you are changing.

Whilst this is not very 'tidy', it's better than multiple changes to
files just to change format.
Such changes make it hard to review commit emails and mess up historic
comparisons as well.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]