Bug #6459
closedcstyle doesn't detect opening braces on the same line as function header
100%
Description
Our style guidelines require that the opening brace of a function
definition be on the line after the header, but the cstyle script
doesn't check it.
Additionally, if a function has a very long header, it is split onto to
two lines. These continuation lines are supposed to be indented by four
spaces, not a tab. However, cstyle does not verify that this is the
case.
This change updates the regular expressions to correctly detect these
cases.
Related issues
Updated by Electric Monk over 6 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
git commit c4567a616165806d1420a481659f5e10a97a1395
commit c4567a616165806d1420a481659f5e10a97a1395 Author: Paul Dagnelie <pcd@delphix.com> Date: 2015-11-24T04:18:51.000Z 6459 cstyle doesn't detect opening braces on the same line as function header Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Alex Reece <alex@delphix.com> Reviewed by: Albert Lee <trisk@omniti.com> Reviewed by: Dan McDonald <danmcd@omniti.com> Approved by: Robert Mustacchi <rm@joyent.com>
Updated by Gordon Ross about 5 years ago
Unfortunately, the 2nd part of this bug description:
Additionally, if a function has a very long header, it is split onto
two lines. These continuation lines are supposed to be indented by
four spaces, not a tab. However, cstyle does not verify [ that ].
Causes a lot of cstyle noise that's really not desirable. See:
#8419 (Should not require four-space indents on function arg continuation lines)
Updated by Marcel Telka about 5 years ago
- Related to Bug #8419: Should not require four-space indents on function arg continuation lines added