We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
no-cheat
1 parent 4b5d31b commit 60468cbCopy full SHA for 60468cb
.github/workflows/no-cheat.sh
@@ -0,0 +1,8 @@
1
+#!/bin/sh
2
+
3
+NEW_CODE=$(git diff origin/main..$(git branch --show-current) | grep -e '^+')
4
+CHEAT=$(echo "${NEW_CODE}" | grep '# pylint: disable')
5
+if [ -n "${CHEAT}" ]; then
6
+ echo "Do not cheat the linter: ${CHEAT}"
7
+ exit 1
8
+fi
.github/workflows/push.yml
@@ -71,10 +71,4 @@ jobs:
71
fetch-depth: 0
72
73
- name: Verify no lint disabled in the new code
74
- run: |
75
- NEW_CODE=$(git diff origin/main..$(git branch --show-current) | grep -e '^+')
76
- CHEAT=$(echo "${NEW_CODE}" | grep '# pylint: disable')
77
- if [ -n "${CHEAT}" ]; then
78
- echo "Do not cheat the linter: ${CHEAT}"
79
- exit 1
80
- fi
+ run: sh .github/workflows/no-cheat.sh
0 commit comments