diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 8640eaf..8cca8db 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -32,8 +32,12 @@ permissions: jobs: sonarcloud: - uses: ByronWilliamsCPA/.github/.github/workflows/python-sonarcloud.yml@987d517d3c8e4b180f4dd15de6d9575f0df91182 # main + uses: ByronWilliamsCPA/.github/.github/workflows/python-sonarcloud.yml@4bd2d7c207a7fcf2dfcec8416c805d06d745c241 # main with: + # Every version requires-python (">=3.10,<3.15") admits, not just the build version. + # SonarPython gates version-specific rules on ALL declared versions, so declaring only + # 3.12 raises 3.11+ and 3.12+ rules against code that must still run on 3.10. + sonar-python-version: '3.10,3.11,3.12,3.13,3.14' # Repo uses hatchling; --no-build cannot install the editable root package no-build: false # Project ByronWilliamsCPA_python-libs lives in the byronwilliamscpa org diff --git a/sonar-project.properties b/sonar-project.properties index 5280e44..16edd70 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -23,8 +23,10 @@ sonar.tests=\ packages/gcs-utilities/tests/,\ packages/gemini-image/tests/ -# Python version -sonar.python.version=3.12 +# Versions the SOURCE supports, matching requires-python (">=3.10,<3.15"). CI overrides this +# via -Dsonar.python.version from the sonar-python-version input, so this key only affects +# local and IDE (SonarLint) analysis. Keep the two in sync. +sonar.python.version=3.10,3.11,3.12,3.13,3.14 # ============================================================================= # Test Coverage Configuration