Skip to content

Improve solacc script #1454

Improve solacc script

Improve solacc script #1454

Workflow file for this run

name: no-cheat
on:
pull_request:
types: [opened, synchronize]
merge_group:
types: [checks_requested]
push:
# required for merge queue to work. jobs.integration.if will mark it as skipped
branches:
- main
jobs:
no-pylint-disable:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'synchronize')
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Verify no lint is disabled in the new code
run: |
NEW_CODE=$(git diff origin/main..$(git branch --show-current) | grep -e '^+')
CHEAT=$(echo "${NEW_CODE}" | grep '# pylint: disable' | grep -v "CHEAT" | wc -c)
if [ "${CHEAT}" -ne 0 ]; then
echo "Do not cheat the linter: ${CHEAT}"
exit 1
fi