Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
jose-luis-rs committed Nov 1, 2023
1 parent 4e795f1 commit e33ae9e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 44 deletions.
21 changes: 0 additions & 21 deletions .github/workflows/codemeta_validate.yaml

This file was deleted.

23 changes: 0 additions & 23 deletions .github/workflows/static_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,28 +51,5 @@ jobs:
uses: './.github/actions/r3bbuild-steps'
with:
build-needed: 'false'

- name: clang-tidy check
run: |
mkdir -p clang-tidy-result
git diff -U0 HEAD^ | python3 $PWD/util/clang-tidy-diff.py -p1 -path build -j4 -use-color \
-iregex '.*\.(cpp|cc|c\+\+|cxx|cl|h|hh|hpp|m|mm|inc)' \
> clang-tidy-result/fixes.yml
cat clang-tidy-result/fixes.yml |\
sed -e 's/\x1b\[[0-9;]*m//g' |\
sed 's/\(^.*\):\([0-9]*\):\([0-9]*\): warning:/::warning file=\1,line=\2,col=\3::/' |\
sed 's/\(^.*\):\([0-9]*\):\([0-9]*\): error:/::error file=\1,line=\2,col=\3::/'
echo "WARN_NUM=$(sed -e 's/\x1b\[[0-9;]*m//g' clang-tidy-result/fixes.yml | grep -w " warning:" | wc -l | xargs)" >> $GITHUB_ENV
echo "ERROR_NUM=$(sed -e 's/\x1b\[[0-9;]*m//g' clang-tidy-result/fixes.yml | grep -w " error:" | wc -l | xargs)" >> $GITHUB_ENV
- name: clang-tidy results
run: |
if [ "${{ env.WARN_NUM }}" -eq "0" ] && [ "${{ env.ERROR_NUM }}" -eq "0" ]; then
echo "::notice::All clean, LGTM!"
else
cat clang-tidy-result/fixes.yml | sed -e 's/\x1b\[[0-9;]*mnote: \x1b\[0m/\x1b\[33mnote: \x1b\[0m/g'
echo "::notice::Clang-tidy generates ${{ env.WARN_NUM }} warnings and ${{ env.ERROR_NUM }} errors! Please fix them before being merged."
exit 1
fi
shell: bash

0 comments on commit e33ae9e

Please sign in to comment.