You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2022/06/21 13:44:07 UTC

[incubator-nuttx-apps] 03/05: Lint Python code with flake8 and isort

This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit 72cb2c237b318b06ca49535696c672133027066d
Author: Christian Clauss <cc...@me.com>
AuthorDate: Fri Apr 9 18:35:47 2021 +0200

    Lint Python code with flake8 and isort
---
 .github/linters/setup.cfg  |  9 +++++++++
 .github/workflows/lint.yml | 10 ++++++++--
 2 files changed, 17 insertions(+), 2 deletions(-)

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