From dfff8abbdf69e4a82cbc028a85b7cc031e66fff6 Mon Sep 17 00:00:00 2001 From: Collin Baker Date: Tue, 26 Oct 2021 15:00:49 +0000 Subject: [PATCH] Disable whitespace lints handled by clang-format These lints are redundant and in rare cases may conflict with clang-format output. We treat clang-format's output as the correct formatting, so disable the lints. The following whitespace lints are retained, all others are disabled: whitespace/blank_line whitespace/comments whitespace/empty_conditional_body whitespace/empty_if_body whitespace/empty_loop_body whitespace/ending_newline whitespace/todo Bug: chromium:1240500 Change-Id: I22e2d8ea4de021ea389e155d8c9e096c3ae6f8b7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3231485 Reviewed-by: Jochen Eisinger Reviewed-by: Nico Weber Commit-Queue: Collin Baker --- presubmit_canned_checks.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py index f36fa8ee03..c27f1f5574 100644 --- a/presubmit_canned_checks.py +++ b/presubmit_canned_checks.py @@ -41,9 +41,21 @@ OFF_BY_DEFAULT_LINT_FILTERS = [ # - build/c++11 : Include file and feature blocklists are # google3-specific # - runtime/references : No longer banned by Google style guide +# - whitespace/... : Most whitespace issues handled by clang-format OFF_UNLESS_MANUALLY_ENABLED_LINT_FILTERS = [ - '-build/c++11', - '-runtime/references', + '-build/c++11', + '-runtime/references', + '-whitespace/braces', + '-whitespace/comma', + '-whitespace/end_of_line', + '-whitespace/forcolon', + '-whitespace/indent', + '-whitespace/line_length', + '-whitespace/newline', + '-whitespace/operators', + '-whitespace/parens', + '-whitespace/semicolon', + '-whitespace/tab', ] ### Description checks