New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

left curly nlow documentation error? #5188

Closed
guillaumecle opened this Issue Oct 11, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@guillaumecle
Contributor

guillaumecle commented Oct 11, 2017

Hello,
I think there is a typo in this documentation:

If the statement/expression/declaration connected to the brace spans multiple lines,
than apply <code>eol</code> rule. Otherwise apply the <code>nl</code> rule.
<code>nlow</code> is a mnemonic for "new line on wrap".

new line is used when the statement/expression/declaration connected to the brace does span multiple lines (and not the opposite), as shown in the example:

For the example above Checkstyle will enforce:
<pre>
if (condition) {
...
</pre>
But for a statement spanning multiple lines, Checkstyle will
enforce:
<pre>
if (condition1 &amp;&amp; condition2 &amp;&amp;
condition3 &amp;&amp; condition4)
{
...

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Oct 12, 2017

Member

If the statement/expression/declaration connected to the brace spans multiple lines, than apply <code>eol</code> rule. Otherwise apply the <code>nl</code> rule.

yes, you are right, it is terrible typo.

should be ....connected to the brace spans multiple lines, than apply <code>nl</code> rule. Otherwise apply the <code>eol</code> rule.

@guillaumecle , please send PR.
thanks a lot for catching this.

Member

romani commented Oct 12, 2017

If the statement/expression/declaration connected to the brace spans multiple lines, than apply <code>eol</code> rule. Otherwise apply the <code>nl</code> rule.

yes, you are right, it is terrible typo.

should be ....connected to the brace spans multiple lines, than apply <code>nl</code> rule. Otherwise apply the <code>eol</code> rule.

@guillaumecle , please send PR.
thanks a lot for catching this.

@rnveach

This comment has been minimized.

Show comment
Hide comment
@rnveach

rnveach Oct 24, 2017

Member

Fix was merged

Member

rnveach commented Oct 24, 2017

Fix was merged

@rnveach rnveach closed this Oct 24, 2017

@rnveach rnveach added this to the 8.4 milestone Oct 24, 2017

timurt added a commit to timurt/checkstyle that referenced this issue Dec 19, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment