You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by ta...@apache.org on 2018/09/10 22:13:01 UTC
[2/3] impala git commit: Avoid long line flake8 warnings for
gen_ir_descriptions.py
Avoid long line flake8 warnings for gen_ir_descriptions.py
Change-Id: I025981176fbd4500ddfeed009514faaae75b8bf0
Reviewed-on: http://gerrit.cloudera.org:8080/11412
Reviewed-by: Tim Armstrong <ta...@cloudera.com>
Tested-by: Tim Armstrong <ta...@cloudera.com>
Project: http://git-wip-us.apache.org/repos/asf/impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/impala/commit/a11e5054
Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/a11e5054
Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/a11e5054
Branch: refs/heads/master
Commit: a11e50549deeec54400d65696540e832d3650960
Parents: dbe0f86
Author: Tim Armstrong <ta...@cloudera.com>
Authored: Mon Sep 10 14:37:28 2018 -0700
Committer: Tim Armstrong <ta...@cloudera.com>
Committed: Mon Sep 10 21:46:50 2018 +0000
----------------------------------------------------------------------
bin/jenkins/critique-gerrit-review.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/impala/blob/a11e5054/bin/jenkins/critique-gerrit-review.py
----------------------------------------------------------------------
diff --git a/bin/jenkins/critique-gerrit-review.py b/bin/jenkins/critique-gerrit-review.py
index 548eac8..7e6f3fa 100755
--- a/bin/jenkins/critique-gerrit-review.py
+++ b/bin/jenkins/critique-gerrit-review.py
@@ -61,7 +61,7 @@ LINE_LIMIT = 90
# Source file extensions that we should apply our line limit and whitespace rules to.
SOURCE_EXTENSIONS = set([".cc", ".h", ".java", ".py", ".sh", ".thrift"])
-# Source file patterns that we exclude from our line limit and whitespace rules.
+# Source file patterns that we exclude from our checks.
EXCLUDE_FILE_PATTERNS = [
re.compile(r".*be/src/kudu.*"), # Kudu source code may have different rules.
re.compile(r".*-benchmark.cc"), # Benchmark files tend to have long lines.
@@ -112,6 +112,13 @@ def get_flake8_comments(revision):
file, line, col, details = match.groups()
line = int(line)
col = int(col)
+ skip_file = False
+ for pattern in EXCLUDE_FILE_PATTERNS:
+ if pattern.match(file):
+ skip_file = True
+ break
+ if skip_file:
+ continue
comments_for_file = comments[file]
comment = {"message": "flake8: {0}".format(details)}
# Heuristic: if the error is on the first column, assume it applies to the whole line.