Skip to content

Commit

Permalink
Last cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
llvm-beanz committed Sep 21, 2023
1 parent 4d19cf3 commit da3ce4f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/clang-format-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,15 @@ jobs:
run: |
echo Comparing $PR_NUMBER vs target branch
git fetch origin refs/pull/$PR_NUMBER/head:pull/$PR_NUMBER
git fetch origin refs/pull/$PR_NUMBER/head:pull/$PR_NUMBER
git checkout pull/$PR_NUMBER
git diff -U0 --no-color $GITHUB_REF..pull/$PR_NUMBER | clang-format-diff-15 -p1 | tee format.diff
cat format.diff
if [ -s format.diff ]
then
echo PR contains clang-format violations. First 50 lines of the diff: >> message.txt
echo \`\`\`diff >> message.txt
cat format.diff | head -n 50 >> message.txt
echo \`\`\` >> message.txt
echo See [action log]\(https://github.com/microsoft/DirectXShaderCompiler/actions/runs/$GITHUB_RUN_ID/job/$GITHUB_JOB\) for the full diff. >> message.txt
echo See [action log]\(https://github.com/microsoft/DirectXShaderCompiler/actions/runs/$GITHUB_RUN_ID/) for the full diff. >> message.txt
gh pr comment $PR_NUMBER --body-file message.txt
exit 1
fi

0 comments on commit da3ce4f

Please sign in to comment.