CI: add pylint
authorAlexander Popov <alex.popov@linux.com>
Tue, 14 May 2024 13:16:29 +0000 (16:16 +0300)
committerAlexander Popov <alex.popov@linux.com>
Tue, 14 May 2024 13:40:08 +0000 (16:40 +0300)
.github/workflows/static_analysis.yml [new file with mode: 0644]
.github/workflows/static_typing_test.yml [deleted file]
.woodpecker/functional_test.yml

diff --git a/.github/workflows/static_analysis.yml b/.github/workflows/static_analysis.yml
new file mode 100644 (file)
index 0000000..e23d7e1
--- /dev/null
@@ -0,0 +1,39 @@
+name: static analysis
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+jobs:
+  static_analysis:
+
+    runs-on: ubuntu-latest
+
+    strategy:
+      max-parallel: 1
+      fail-fast: false
+      matrix:
+        python-version: ['3.12']
+
+    steps:
+
+    - name: Set up Python ${{ matrix.python-version }}
+      uses: actions/setup-python@v5
+      with:
+        python-version: ${{ matrix.python-version }}
+
+    - name: Get the source code
+      uses: actions/checkout@v4
+
+    - name: Check static typing with mypy
+      run: |
+        pip install mypy
+        mypy kernel_hardening_checker/ --show-error-context --pretty --no-incremental --check-untyped-defs --disallow-untyped-defs --strict-equality
+
+    - name: Check code with pylint
+      run: |
+        pip install pylint
+        pip install setuptools
+        pylint --recursive=y kernel_hardening_checker setup.py
diff --git a/.github/workflows/static_typing_test.yml b/.github/workflows/static_typing_test.yml
deleted file mode 100644 (file)
index 92761f7..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-name: static typing test
-
-on:
-  push:
-    branches: [ master ]
-  pull_request:
-    branches: [ master ]
-
-jobs:
-  static_typing_test:
-
-    runs-on: ubuntu-latest
-
-    strategy:
-      max-parallel: 1
-      fail-fast: false
-      matrix:
-        python-version: ['3.12']
-
-    steps:
-
-    - name: Set up Python ${{ matrix.python-version }}
-      uses: actions/setup-python@v5
-      with:
-        python-version: ${{ matrix.python-version }}
-
-    - name: Get the source code
-      uses: actions/checkout@v4
-
-    - name: Check static typing with mypy
-      run: |
-        pip install mypy
-        mypy kernel_hardening_checker/ --show-error-context --pretty --no-incremental --check-untyped-defs --disallow-untyped-defs --strict-equality
index 2196f6c5b189b65694dd04658298d8c1113999d2..6eab6a51c58dedfd46c56df4db34588fa3cb2808 100644 (file)
@@ -29,6 +29,15 @@ steps:
       - python --version
       - pip install --no-cache-dir mypy
       - mypy kernel_hardening_checker/ --show-error-context --pretty --no-incremental --check-untyped-defs --disallow-untyped-defs --strict-equality
+  pylint-checking:
+    image: python:3
+    pull: true
+    commands:
+      - echo "Install the pylint tool..."
+      - python --version
+      - pip install --no-cache-dir pylint
+      - pip install --no-cache-dir setuptools
+      - pylint --recursive=y kernel_hardening_checker setup.py
   functional-test-with-coverage:
     image: python:3
     pull: true