From c4502a0c41ddf65974165d01dfea9942905ca2f4 Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Fri, 8 Apr 2022 12:08:56 +0000 Subject: [PATCH] Re-enable lint presubmit This CL updates the list of lint filters in order to allow the lint presubmit check to pass. This allows each of the individual exclusions to be fixed or ignored independently. Issue: dawn:1339 Change-Id: Ia96a38c54508628996ca1e19555c01b11776c07f Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86045 Auto-Submit: Dan Sinclair Reviewed-by: Ben Clayton Reviewed-by: Corentin Wallez Commit-Queue: Corentin Wallez --- PRESUBMIT.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/PRESUBMIT.py b/PRESUBMIT.py index 57ddde0c96..c54ff29e34 100644 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py @@ -71,6 +71,15 @@ NONINCLUSIVE_REGEX_LIST = [] for reg in NONINCLUSIVE_REGEXES: NONINCLUSIVE_REGEX_LIST.append(re.compile(reg)) +LINT_FILTERS = [ + "-build/header_guard", "-build/include", "-build/include_directory", + "-build/include_order", "-build/include_what_you_use", "-build/namespaces", + "-legal/copyright", "-readability/braces", "-readability/casting", + "-readability/inheritance", "-readability/namespace", "-runtime/explicit", + "-runtime/indentation_namespace", "-runtime/int", "-runtime/printf", + "-whitespace/comments", "-whitespace/empty_if_body" +] + def _CheckNonInclusiveLanguage(input_api, output_api, source_file_filter=None): """Checks the files for non-inclusive language.""" @@ -129,8 +138,9 @@ def _DoCommonChecks(input_api, output_api): input_api, output_api)) results.extend( input_api.canned_checks.CheckDoNotSubmit(input_api, output_api)) - # TODO(dawn:1339): Add back CheckChangeLintsClean, it fails on all Dawn - # source files because they where never linted (and use different rules). + results.extend( + input_api.canned_checks.CheckChangeLintsClean( + input_api, output_api, lint_filters=LINT_FILTERS)) results.extend( _CheckNonInclusiveLanguage(input_api, output_api, _NonInclusiveFileFilter))