diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 2f90a1e..87be27e 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -30,9 +30,13 @@ permissions: jobs: sonarcloud: name: SonarCloud Analysis - uses: ByronWilliamsCPA/.github/.github/workflows/python-sonarcloud.yml@7d12f5486ab5c856397ebaa4acd3c99ca385227c # main + uses: ByronWilliamsCPA/.github/.github/workflows/python-sonarcloud.yml@4bd2d7c207a7fcf2dfcec8416c805d06d745c241 # main with: python-version: '3.12' + # Every version requires-python (">=3.11,<3.15") admits, not just the build version. + # SonarPython gates version-specific rules on ALL declared versions, so declaring only + # 3.12 raised PEP 695 rules (S6794/S6796) against code that must still run on 3.11. + sonar-python-version: '3.11,3.12,3.13,3.14' source-directory: 'src/rag_processor' sonar-organization: 'byronwilliamscpa' sonar-project-key: 'ByronWilliamsCPA_rag-processor' diff --git a/sonar-project.properties b/sonar-project.properties index db81598..c2bcde6 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -18,8 +18,11 @@ sonar.sources=src/ # Test directories (comma-separated) sonar.tests=tests/ -# Python version -sonar.python.version=3.12 +# Python versions the SOURCE supports, matching requires-python (">=3.11,<3.15"). +# CI overrides this via -Dsonar.python.version from the sonar-python-version workflow input, +# so this key only affects local and IDE (SonarLint) analysis. Keep the two in sync, or +# SonarLint keeps raising the 3.12+ rules that CI no longer does. +sonar.python.version=3.11,3.12,3.13,3.14 # ============================================================================= # Test Coverage Configuration