From: Alexander Popov Date: Tue, 14 May 2024 13:16:29 +0000 (+0300) Subject: CI: add pylint X-Git-Tag: v0.6.10~65^2~1 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=0e7c819a8f0039d932e40df2d5fa340a363f68c4;p=kconfig-hardened-check.git CI: add pylint --- diff --git a/.github/workflows/static_analysis.yml b/.github/workflows/static_analysis.yml new file mode 100644 index 0000000..e23d7e1 --- /dev/null +++ b/.github/workflows/static_analysis.yml @@ -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 index 92761f7..0000000 --- a/.github/workflows/static_typing_test.yml +++ /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 diff --git a/.woodpecker/functional_test.yml b/.woodpecker/functional_test.yml index 2196f6c..6eab6a5 100644 --- a/.woodpecker/functional_test.yml +++ b/.woodpecker/functional_test.yml @@ -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