Commit Graph

16 Commits

Author SHA1 Message Date
erg@google.com
8a95ecca27 Update to #179:
- Suggest "const_cast" when encountering "(char*)".
- Warn on template arguments to make_pair().
- Require <utility> if pair<> is seen now that <map> doesn't include it.
- Warn on lack of "explicit" keyword on single argument inline constructors.
- Better check for hanging ')' when closing function calls.
- Don't warn on: 'int v[1][3] = {{1, 2, 3}};'
- Allow function calls as the first argument to printf().
Review URL: http://codereview.appspot.com/4974066
2011-09-08 00:45:54 +00:00
erg@google.com
efeacdf0fa Add extension mechanisms for custom checks to cpplint.py.
This allows users of cpplint.py to specify additional check functions.

Will be used by: http://codereview.chromium.org/7834045/

Review URL: http://codereview.appspot.com/4950069
Patch from Alexei Svitkine <asvitkine@chromium.org>.
2011-09-07 21:12:16 +00:00
erg@google.com
d7d2747c6c Update cpplint.py to #161:
- ostream should be treated as a system header
- Expand the MockCallback whitelist entry for gMock.
- Virtual destructor check shouldn't get confused with
  "class EXPORT ClassName {" constructs.
- Don't warn about the length of "$ Id: ... $" lines.
- Better semicolon checks in for() loops.
- Better whitespace comment checks.
Review URL: http://codereview.appspot.com/4964064
2011-09-07 17:36:35 +00:00
erg@google.com
8f91ab2835 Reverted r70, at asvitkine's request 2011-09-06 21:04:45 +00:00
erg@google.com
5210aec6df Upstream useful lint check from WebKit's fork of cpplint.py.
Checks against "Foo *bar" and "Foo &bar" declarations.

WebKit patch was: http://trac.webkit.org/changeset/46856

Credit Torch Mobile, Inc. who have contributed the WebKit patch in question.

Patch committed for asvitkine@chromium.org.
2011-09-06 20:19:05 +00:00
erg@google.com
a51c16b542 Allow blank Doxygen-style comments. Patch by mball@google.com. 2010-11-17 18:09:31 +00:00
erg@google.com
42e59b0ce7 Project prefix directory should work with Hg.
Patch based on one by tomic80.
2010-10-04 22:18:07 +00:00
erg+personal@google.com
0518964d22 Update cpplint.py to #150:
- Be explicit about "class Foo :\n public Bar" being wrong.
- Allow snprintf(NULL, 0, ...) pattern.
- Extend NOLINT syntax.
- Remove NOLINT hint.
- <new> is an STL header.
- Use original filename for header guard when invoked by flymake.
- Avoid false-positive build/include_what_you_use errors for use
  of classes called "string" other than STL ones.

Review URL: http://codereview.chromium.org/1697023
2010-04-30 20:43:03 +00:00
erg@google.com
5e1696994b Check for mercurial checkouts in addition to svn and git.
Patch by Florian Loitsch <floitsch@google.com>
2010-01-28 20:17:01 +00:00
erg@google.com
a868d2d725 Update cpplint.py to #131:
- Optional check to make sure #includes are in alphabetical order.
- Optional "--counting=" option for statistics on what errors were found.
- Fix typos.
- Warn on overloading the unary operator&(). (Binary operator&() is fine).
- Fix false positives on "new int(x)"; it is not a cast.
- Allow "NOLINT" on header guards.
- Prevent members of a class from being "const string&".
2009-10-09 21:18:45 +00:00
erg@google.com
969161cb78 Relicense cpplint under 3 clause BSD for webkit folks.
Review URL: http://codereview.chromium.org/147238
2009-06-26 22:06:46 +00:00
erg@google.com
e35f765fa6 Update cpplint.py to #122:
- Don't check quoted filenames with irrelevant tests.
- Make cpplint accept 'for (foo; bar; ) {}'.
- Work with temporary files generated by Emacs flymake-mode.
- Don't warn on "/// Doxygen comments."
- Check the use of DCHECK in the same way we check the use of CHECK.
- Properly handle relative file paths with IncludeWhatYouUse checking.
- Start checking for IncludeWhatYouUse in a limited way in .cc files.
2009-06-19 20:52:09 +00:00
erg@google.com
3664910272 Update cpplint.py to #114:
- Prevent invalid increment constructs
- Allow long URLs in lines without hitting the 80 char limit
- Prevent false positives of "Extra space after ( in function call" in macro definitions.
2009-03-25 21:18:36 +00:00
erg@google.com
a87abb8b53 Update cpplint.py to #110.
- Allow comments with URLs to exceed the 80 column limit.
- Avoid false positives for "Lint failed to find start of function body"
  test.
- Add checks for transform and min_element.
- Style fixes

Review URL: http://codereview.chromium.org/28056
2009-02-24 01:41:01 +00:00
mmentovai
e2ee45d952 Set svn properties for cpplint 2009-01-15 20:36:30 +00:00
erg@google.com
4e00b9a0d1 Open-sourcing cpplint.py. 2009-01-12 23:05:11 +00:00