diff --git a/.github/workflows/checks-main.yml b/.github/workflows/checks-main.yml index fb1e725d88..259de1c2f4 100644 --- a/.github/workflows/checks-main.yml +++ b/.github/workflows/checks-main.yml @@ -25,4 +25,4 @@ jobs: run: ./tools/lint/test/run.py - name: Lint all tests - run: ./tools/scripts/ci_lint.sh + run: ./tools/lint/lint.py test/ diff --git a/.github/workflows/checks-pr.yml b/.github/workflows/checks-pr.yml index f21411ad77..ee6d2b5464 100644 --- a/.github/workflows/checks-pr.yml +++ b/.github/workflows/checks-pr.yml @@ -39,4 +39,4 @@ jobs: for file in $CHANGED; do echo $file done - ./tools/scripts/ci_lint.sh $CHANGED + ./tools/lint/lint.py $CHANGED diff --git a/tools/lint/lint.py b/tools/lint/lint.py index 9f0dca2811..b8eaa86e86 100755 --- a/tools/lint/lint.py +++ b/tools/lint/lint.py @@ -97,7 +97,11 @@ if __name__ == '__main__': if args.exceptions: exceptions = lib.exceptions.parse(args.exceptions) else: - exceptions = dict() + try: + with open('lint.exceptions', 'r') as default_exceptions: + exceptions = lib.exceptions.parse(default_exceptions) + except FileNotFoundError: + exceptions = dict() files = [path for _path in args.path for path in collect_files(_path)] file_count = len(files) diff --git a/tools/scripts/ci_lint.sh b/tools/scripts/ci_lint.sh deleted file mode 100755 index 019ce9225b..0000000000 --- a/tools/scripts/ci_lint.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -if [ "$#" -eq 0 ]; then - set -- test/ -fi - -./tools/lint/lint.py --exceptions lint.exceptions $@