0
Commit Graph

4 Commits

Author SHA1 Message Date
shaochenguang
e46cbd4dc8 Fix run apply_cpplint_header_guard.py IndexError.
When iterating through the last line of cpplint_data, which is
'Total errors found: xx', after executing entry = entry.split(':'), the
length of entry is 2. If continue to execute msg = entry[2].rstrip(),
an error will occur: IndexError: list index out of range."

Bug: 1200694
Change-Id: I6917445f072cf45d790303807c00be2e1d20d975
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5051566
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1229119}
2023-11-27 00:32:11 +00:00
Avi Drissman
dfd8808526 Update copyright headers in testing/, tools/
The methodology used to generate this CL is documented in
https://crbug.com/1098010#c95.

No-Try: true
No-Presubmit: true
Bug: 1098010
Change-Id: I3a8a7b150e7bd64690534727150646081df50439
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3900697
Reviewed-by: Mark Mentovai <mark@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1047644}
2022-09-15 20:11:09 +00:00
Sumaid Syed
7263132b74 Add custom root option to apply_cpplint_header_guard.py script
Take an optional command line argument as the root
Required in directories such as native_client_sdk/

Bug: 1229927
Change-Id: Ic66ec8df5e7d6544e7634fc4c528a8798faf200b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3033826
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Sumaid <ssyed@igalia.com>
Cr-Commit-Position: refs/heads/master@{#904637}
2021-07-23 04:57:13 +00:00
Lei Zhang
ac975fbc87 Add tools/apply_cpplint_header_guard.py.
This is a simple tool to fix header guards using cpplint's
build/header_guard recommendations. Since cpplint already reliably does
the work to make these recommendations, it is much easier to just apply
them with this tool than to use clang-tidy, which requires compilation.

Bug: 1200694
Change-Id: I3fe82d6e0330dd3d3aeee073067f77f8338bed67
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2837571
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#874555}
2021-04-21 03:51:06 +00:00