Bug 157969 - check-webkit-style gets flags std::literals::chrono_literals as bad naming
Summary: check-webkit-style gets flags std::literals::chrono_literals as bad naming
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brady Eidson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-20 21:59 PDT by Brady Eidson
Modified: 2016-05-23 09:45 PDT (History)
5 users (show)

See Also:


Attachments
Patch WIP (1.64 KB, patch)
2016-05-20 22:21 PDT, Brady Eidson
beidson: commit-queue-
Details | Formatted Diff | Diff
Patch (2.34 KB, patch)
2016-05-21 08:17 PDT, Brady Eidson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2016-05-20 21:59:36 PDT
check-webkit-style gets flags some std: namespaces as bogus

Example:
https://bugs.webkit.org/show_bug.cgi?id=157948#c6

"std::literals::chrono_literals is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]"

A good rule for our types, but std::literals::chrono_literals is in the stdlib
Comment 1 Brady Eidson 2016-05-20 22:20:37 PDT
For the underscore rule, we just have a whole bunch of one-off exceptions.

I'll add another.
Comment 2 Brady Eidson 2016-05-20 22:21:16 PDT
Created attachment 279538 [details]
Patch WIP

Don't have time to do the ChangeLog dance tonight before bed, but otherwise this patch is probably good to go.
Comment 3 Brady Eidson 2016-05-21 08:17:44 PDT
Created attachment 279542 [details]
Patch
Comment 4 Alex Christensen 2016-05-21 17:42:25 PDT
I'm not sure this will come up often after the latest patch from https://bugs.webkit.org/show_bug.cgi?id=157948 makes there be just one using namespace std::literals::chrono_literals;
Why does std::numeric_limits::... pass the style check?
Comment 5 Brady Eidson 2016-05-21 18:44:34 PDT
(In reply to comment #4)
> I'm not sure this will come up often after the latest patch from
> https://bugs.webkit.org/show_bug.cgi?id=157948 makes there be just one using
> namespace std::literals::chrono_literals;

While strictly true, any patch that would add such a line itself would be wrongly flagged.

> Why does std::numeric_limits::... pass the style check?

It's explicitly exempted in a different section.
Comment 6 WebKit Commit Bot 2016-05-23 09:45:32 PDT
Comment on attachment 279542 [details]
Patch

Clearing flags on attachment: 279542

Committed r201288: <http://trac.webkit.org/changeset/201288>
Comment 7 WebKit Commit Bot 2016-05-23 09:45:36 PDT
All reviewed patches have been landed.  Closing bug.