# SonarCloud project configuration for AWX # Complete documentation: https://docs.sonarqube.org/latest/analysis/analysis-parameters/ # ============================================================================= # PROJECT IDENTIFICATION (REQUIRED) # ============================================================================= # The unique project identifier. This is mandatory. # Do not duplicate or reuse! # Available characters: [a-zA-Z0-9_:\.\-] # Must have least one non-digit. sonar.projectKey=ansible_awx sonar.organization=ansible # Project metadata sonar.projectName=awx # ============================================================================= # SOURCE AND TEST CONFIGURATION # ============================================================================= # Source directories to analyze sonar.sources=. sonar.inclusions=awx/** # Test directories sonar.tests=awx/main/tests # Test file patterns sonar.test.inclusions=\ **/test_*.py,\ **/*_test.py,\ **/tests/**/*.py # Set branch-specific new code definition # # This is important to always check against the main branch for new PRs, # otherwise the PR may fail during backporting, since the old version of the code # may not respect the minimum requirements for the existing Quality Gate. sonar.newCode.referenceBranch=devel # ============================================================================= # LANGUAGE CONFIGURATION # ============================================================================= # Python versions supported by the project #sonar.python.version=3.9,3.10,3.11 # File encoding sonar.sourceEncoding=UTF-8 # ============================================================================= # REPORTS AND COVERAGE # ============================================================================= # Test and coverage reports (paths relative to project root) sonar.python.coverage.reportPaths=reports/coverage.xml sonar.python.xunit.reportPath=/reports/junit.xml # External tool reports (add these paths when tools are configured) # sonar.python.pylint.reportPaths=reports/pylint-report.txt # sonar.python.bandit.reportPaths=reports/bandit-report.json # sonar.python.mypy.reportPath=reports/mypy-report.txt # sonar.python.flake8.reportPaths=reports/flake8-report.txt # sonar.python.xunit.reportPath=reports/junit.xml # ============================================================================= # EXCLUSIONS - FILES AND DIRECTORIES TO IGNORE # ============================================================================= # General exclusions - files and directories to ignore from analysis sonar.exclusions=\ **/tests/**,\ **/__pycache__/**,\ **/*.pyc,\ **/*.pyo,\ **/*.pyd,\ **/build/**,\ **/dist/**,\ **/*.egg-info/** # ============================================================================= # COVERAGE EXCLUSIONS # ============================================================================= # Files to exclude from coverage calculations sonar.coverage.exclusions=\ **/tests/**,\ **/.tox/**,\ **/test_*.py,\ **/*_test.py,\ **/conftest.py,\ **/migrations/**,\ **/settings*.py,\ **/defaults.py,\ **/manage.py,\ **/__main__.py,\ tools/scripts/** # ============================================================================= # DUPLICATION EXCLUSIONS # ============================================================================= # Ignore code duplication in migrations and tests sonar.cpd.exclusions=\ **/migrations/**,\ **/tests/** # ============================================================================= # ISSUE IGNORE RULES # ============================================================================= # Ignore specific rules for certain file patterns sonar.issue.ignore.multicriteria=e1 # Ignore "should be a variable" in migrations sonar.issue.ignore.multicriteria.e1.ruleKey=python:S1192 sonar.issue.ignore.multicriteria.e1.resourceKey=**/migrations/**/* # ============================================================================= # GITHUB INTEGRATION # ============================================================================= # The following properties are automatically handled by GitHub Actions: # sonar.pullrequest.key - handled automatically # sonar.pullrequest.branch - handled automatically # sonar.pullrequest.base - handled automatically # ============================================================================= # DEBUGGING # ============================================================================= # These are aggressive settings to ensure maximum detection # do not use in production # sonar.verbose=true # sonar.log.level=DEBUG # sonar.scm.exclusions.disabled=true # sonar.java.skipUnchanged=false # sonar.scm.forceReloadAll=true # sonar.filesize.limit=100 # sonar.qualitygate.wait=true