Fix incorrect script for no-pylint-disable #130
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: no-cheat | |
on: | |
pull_request: | |
types: [opened, synchronize] | |
jobs: | |
no-pylint-disable: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4.2.2 | |
with: | |
fetch-depth: 0 | |
- name: Verify no lint is disabled in the new code | |
run: | | |
git fetch origin $GITHUB_BASE_REF:$GITHUB_BASE_REF | |
git diff $GITHUB_BASE_REF...$(git branch --show-current) >> diff_data.txt | |
python tests/unit/no_cheat.py diff_data.txt >> cheats.txt | |
COUNT=$(cat cheats.txt | wc -c) | |
if [ ${COUNT} -gt 1 ]; then | |
cat cheats.txt | |
exit 1 | |
fi |