diff --git a/.github/workflows/pre_commit_checks.yml b/.github/workflows/pre_commit_checks.yml index 764757311aa..fdc479af129 100644 --- a/.github/workflows/pre_commit_checks.yml +++ b/.github/workflows/pre_commit_checks.yml @@ -23,7 +23,7 @@ jobs: cache: pip - name: Install pre-commit - run: pip install pre-commit==3.6.0 + run: pip install pre-commit==3.7.0 - uses: actions/cache@v4 with: @@ -32,3 +32,9 @@ jobs: - name: Run pre-commit run: pre-commit run --all-files --show-diff-on-failure --color always + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: pre-commit-results + path: mypy/coverage.json diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index aa4f29a7afc..6b690bae139 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -82,6 +82,13 @@ repos: rev: v1.10.0 hooks: - id: mypy + args: + [ + "--ignore-missing-imports", + "--scripts-are-modules", + "--linecoverage-report", + "mypy/", + ] additional_dependencies: - types-pyyaml - types-cachetools diff --git a/sonar-project.properties b/sonar-project.properties index d53f913b0bc..01bdef5b163 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -10,8 +10,11 @@ sonar.links.scm=https://github.com/minvws/nl-kat-coordination/ # Source encoding sonar.sourceEncoding=UTF-8 +# Python language configuration sonar.python.version=3.10 +sonar.python.mypy.reportPaths=mypy/coverage.json + # Analysis scoping # sonar.sources=assets,public,src,templates # sonar.tests=tests