Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ jobs:
head_commit=$(git rev-parse FETCH_HEAD)
# diff-filter for lower case letter:
# https://github.com/git/git/commit/7f2ea5f0f2fb056314092cce23202096ca70f076
git --no-pager diff --diff-filter=d --name-only $head_commit | grep -e "csrc/.*\.cpp" -e "csrc/.*\.h" | xargs lintrunner --take CLANGTIDY --force-color
files=$(git --no-pager diff --diff-filter=d --name-only $head_commit | grep -e "csrc/.*\.cpp" -e "csrc/.*\.h" || true)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Broad pipeline error suppression

The trailing || true treats every file-discovery failure as an empty result, so an unavailable revision or repository read error skips clang-tidy and lets the step succeed instead of exposing the underlying failure.

if [ -n "$files" ]; then
echo "$files" | xargs -r lintrunner --take CLANGTIDY --force-color
fi

lintrunner:
runs-on: ubuntu-latest
Expand Down