diff --git a/scripts/lint.sh b/scripts/lint.sh index e54f1d8..f585e83 100755 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -32,6 +32,6 @@ set -e git checkout -- . # clang-tidy -git diff -U0 HEAD | "${SCRIPT_DIR}/ignore_diff.py" "${SCRIPT_DIR}/clang-tidy.ignore" | clang-tidy-diff -p1 -quiet > "${TARGET_DIR}"/clang-tidy.txt +git diff -U0 HEAD | "${SCRIPT_DIR}/ignore_diff.py" "${SCRIPT_DIR}/clang-tidy.ignore" | clang-tidy-diff -p1 -quiet | sed '${/^[[:space:]]*$/d;}' > "${TARGET_DIR}"/clang-tidy.txt echo "linters completed ======================================" diff --git a/scripts/phabtalk/phabtalk.py b/scripts/phabtalk/phabtalk.py index 27799df..08b8910 100755 --- a/scripts/phabtalk/phabtalk.py +++ b/scripts/phabtalk/phabtalk.py @@ -323,7 +323,7 @@ class BuildReport: self.comments.append(section_title('clang-tidy', False, False)) return p = os.path.join(self.results_dir, self.clang_tidy_result) - if os.stat(p).st_size > 4: + if os.stat(p).st_size > 0: self.api.add_artifact(self.ph_id, self.clang_tidy_result, "clang-tidy", self.results_url) ignore = pathspec.PathSpec.from_lines(pathspec.patterns.GitWildMatchPattern, open(self.clang_tidy_ignore, 'r').readlines())