Bug 173859 - check-webkit-style complains "multi-line control clauses should use brace" for single line if-statement followed by line with 8 space characters
Summary: check-webkit-style complains "multi-line control clauses should use brace" fo...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2017-06-26 20:32 PDT by John Wilander
Modified: 2017-09-05 16:05 PDT (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description John Wilander 2017-06-26 20:32:07 PDT
This code ...

if (sorted.size() < minimum)
    return { };

... results in this checker error:

Multi line control clauses should use braces.  [whitespace/braces] [4]
Comment 1 John Wilander 2017-06-27 09:57:36 PDT
I found out why it was complaining. Xcode had indented eight characters, like so:

    if (sorted.size() < minimum)
        return { };
        // Eight space chars here confuses the checker.
Comment 2 Daniel Bates 2017-09-05 16:01:45 PDT
I hit this bug with attachment #319945 [details] (bug #176388).