From 72cb2c237b318b06ca49535696c672133027066d Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Fri, 9 Apr 2021 18:35:47 +0200 Subject: [PATCH] Lint Python code with flake8 and isort --- .github/linters/setup.cfg | 9 +++++++++ .github/workflows/lint.yml | 10 ++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 .github/linters/setup.cfg diff --git a/.github/linters/setup.cfg b/.github/linters/setup.cfg new file mode 100644 index 000000000..9c18e21fe --- /dev/null +++ b/.github/linters/setup.cfg @@ -0,0 +1,9 @@ +[flake8] +ignore = W503,W605 +max-complexity = 27 +max-line-length = 125 +show-source = True +statistics = True + +[isort] +profile = black diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index cf9c111fe..df35b1b7f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -14,9 +14,15 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 0 - - name: YAML Lint + - run: mkdir super-linter.report + - name: Lint uses: github/super-linter@v4 env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} VALIDATE_ALL_CODEBASE: false - VALIDATE_YAML: true VALIDATE_PYTHON_BLACK: true + VALIDATE_PYTHON_FLAKE8: true + PYTHON_FLAKE8_CONFIG_FILE: setup.cfg + VALIDATE_PYTHON_ISORT: true + PYTHON_ISORT_CONFIG_FILE: setup.cfg + VALIDATE_YAML: true