Improve cpplint defaults
While enabling cpplint on base I found an extraneous error and an overly
complicated invocation of CheckChangeLintsClean. This change disables
the extraneous error and improves the file filtering defaults to make it
easier to invoke cpplint.
The warning was:
base\win\win_util.cc(193): Missing username in TODO; it should look
like "// TODO(my_username): Stuff." [readability/todo] [2]
Chromium has over 10,000 TODO comments that are links to bugs instead of
users so we clearly want to suppress this warning.
Most calls to CheckChangeLintsClean in Chromium pass in custom file
filtering in order to only analyze C++ files. Failing to pass a file
filter leads to errors like this:
Ignoring base\win\embedded_i18n\create_string_rc.py; not a valid
file name (cc, cuh, cu, cpp, h)
Ignoring c:\src\chromium\src\components\arc\PRESUBMIT.py; not a
valid file name (cu, cc, cuh, cpp, h)
It doesn't make sense for the canned checks version of
CheckChangeLintsClean to default to passing in files that cpplint will
complain about so if source_file_filter is None then I configure an
appropriate filter.
This change also switches to vs7 output format by default on Windows,
and deletes a trailing space.
Bug: 1309977
Change-Id: I342ca9e56a41502755dfc09307b441dfa6a48ec0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3655592
Reviewed-by: Will Harris <wfh@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
changes/92/3655592/7
parent
964f8124b6
commit
00de780a6e
Loading…
Reference in New Issue