Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1443)

Issue 1959503003: Update cpplint.py to r456. (Closed)

Created:
4 years, 7 months ago by Alex Vakulenko
Modified:
4 years, 7 months ago
CC:
chromium-reviews, dpranke+depot_tools_chromium.org, iannucci+depot_tools_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Update cpplint.py to r456. This is a cherry-pick of the GitHub commit, created after merging relevant changes from Google's internal cpplint.py implementation. 456 - Tweak lint to sometimes allow { on line following array initialization. 455 - Recognize more types. 454 - Try a bit harder to detect templated types. 453 - Changed error message wording on build/storage_class to be less ambiguous. 452 - Recognize more types to silence false positives for brace warnings. 451 - <skipped> 450 - <skipped> 449 - Ignore whitespace/tab for Linux Kernel files. 448 - Remove some more false positive lint warnings for int64{n}. 447 - Just one warning message for line length is enough, don't need two. 446 - Allow braced conversions to int16, uint64, etc. per the style guide. 445 - Fixed handling of backslash escapes for checking whether a "//" is quoted. 444 - Reduced dependency on hardcoded .cc extension. 443 - Disable single-arg constructor checks by default, since ClangTidy has the same check. We could just delete the check entirely, but it's slightly useful in places that can't run ClangTidy. 442 - Fix matching of macro names in CheckTrailingSemicolon to include digits. 441 - Deleted checks: - All checks for RValue references. - Spacing check around boolean &&, because those look like RValue references. A huge amount of code and effort were dedicated to tell RValue references apart from boolean expressions, and to differentiate allowed versus banned RValue references. But we still get regular false positives from this one check. Rather than making the check more complex than what it already is, it seemed safer to just delete it altogether for now, and have a different process for catching RValue references. 440 - Add rule to cpplint to throw error on empty if statement bodies without else clauses. If statement bodies with comments are not considered empty. 439 - Allow spaces before closing brace of namespace block so that namespaces inside of macro definitions (where the entire macro definition is indented) are not treated as errors. 438 - cpplint: fix a false positive on `new const int(x)`. 437 - Only check for function length when current line is inside a function. 436 - cpplint: Catch static `std::string` instances as well as those written as `string`. Previously users would sometimes work around the lint warning by changing their code to even worse code by adding the "std::" prefix. 435 - cpplint: Be a little smarter about warning on indentation. 434 - cpplint: Remove false positives on some functions returning string const&. 433 - cpplint: improve diagnostics of global/static string objects. 432 - Allow non-const reference parameters for iostream based types. 431 - Better handling of raw strings inside comments. 430 - <noop> 429 - <skipped> 428 - <skipped> 427 - Add support to CHECK_NOTNULL when checking if a member variable is initialized with itself. 426 - Allow suppressing specific warnings in C headers. 425 - Allow spaces before parens for inline assembly. 424 - Remove lint checks for {EXPECT,ASSERT}_.*_M. 423 - Allow comment lines of more than 80 characters if they contain a single "word" (without any spaces). 422 - cpplint: Warn on inclusion of C++14 headers. 421 - cpplint: recognize <shared_mutex> as a standard library header. 420 - Add <scoped_allocator> to cpplint's list of C++ standard headers. 419 - Add cpplint check for tr1/ headers. We removed the nanny guards for these 418 - <skipped> 417 - Update the styleguide and cpplint to allow unnamed parameters 416 - Remove the rule explicitly banning non-default move operations. 415 - Remove the check for explicit multi arg constructors 414 - Include clarity of lambda default captures in "pros" section, mention of capturing `this` and lambdas which escape the current scope in "cons". Soften the ban on default captures to a preference, with admonition against using them for capturing `this` or when they will escape the current scope. This is a fairly straightforward change with a brief inclusion of 2 problematic cases for implicit capture. As this is the style guide, I'm not sure how much more detail is appropriate. 413 - Fixed a bug by making regex in CleanseRawStrings match multiple raw strings on a single line in left-to-right order. 412 - Fixed false positive for classes derived using decltype() 411 - <skipped> 410 - Recognize '1LL<<20' as numeric and don't flag it for spacing. BUG= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=300481

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+353 lines, -592 lines) Patch
M cpplint.py View 60 chunks +353 lines, -592 lines 0 comments Download

Messages

Total messages: 16 (6 generated)
Alex Vakulenko
I have pulled all the relevant changes from google3's cpplint into depot_tools' copy. Now the ...
4 years, 7 months ago (2016-05-06 21:54:41 UTC) #3
Elliot Glaysher
There were changes to the unit testing suite, right? Please update cpplint_unittest.py.
4 years, 7 months ago (2016-05-06 22:05:33 UTC) #4
Alex Vakulenko
On 2016/05/06 22:05:33, Elliot Glaysher wrote: > There were changes to the unit testing suite, ...
4 years, 7 months ago (2016-05-06 22:37:36 UTC) #5
Elliot Glaysher
Oh, I didn't even notice this was for depot_tools. I thought this was for the ...
4 years, 7 months ago (2016-05-06 22:56:22 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1959503003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1959503003/1
4 years, 7 months ago (2016-05-06 22:58:56 UTC) #8
commit-bot: I haz the power
No L-G-T-M from a valid reviewer yet. CQ run can only be started by full ...
4 years, 7 months ago (2016-05-06 22:58:59 UTC) #10
Dirk Pranke
rs lgtm.
4 years, 7 months ago (2016-05-06 23:01:18 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1959503003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1959503003/1
4 years, 7 months ago (2016-05-06 23:01:26 UTC) #13
Alex Vakulenko
On 2016/05/06 22:58:59, commit-bot: I haz the power wrote: > No L-G-T-M from a valid ...
4 years, 7 months ago (2016-05-06 23:01:28 UTC) #14
commit-bot: I haz the power
4 years, 7 months ago (2016-05-06 23:03:43 UTC) #16
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
http://src.chromium.org/viewvc/chrome?view=rev&revision=300481

Powered by Google App Engine
This is Rietveld 408576698