-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathsonar-project.properties
More file actions
153 lines (126 loc) · 5 KB
/
sonar-project.properties
File metadata and controls
153 lines (126 loc) · 5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# SonarCloud project configuration for AAP Gateway
# 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_automation-reports
sonar.organization=ansible
# Project metadata
sonar.projectName=automation-reports
# =============================================================================
# SOURCE AND TEST CONFIGURATION
# =============================================================================
# Source directories to analyze
sonar.sources=src
# Test directories
sonar.tests=src/backend/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=main
# =============================================================================
# LANGUAGE CONFIGURATION
# =============================================================================
# Python versions supported by the project
sonar.python.version=3.12
# File encoding
sonar.sourceEncoding=UTF-8
# =============================================================================
# REPORTS AND COVERAGE
# =============================================================================
# Test and coverage reports (paths relative to project root)
sonar.python.coverage.reportPaths=src/backend/coverage-backend.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/**,\
**/venv/**,\
**/.venv/**,\
**/env/**,\
**/__pycache__/**,\
**/*.pyc,\
**/*.pyo,\
**/*.pyd,\
**/build/**,\
**/dist/**,\
**/*.egg-info/**,\
**/htmlcov/**,\
**/.tox/**,\
**/node_modules/**,\
**/.git/**,\
**/reports/**,\
**/.scannerwork/**,\
**/.sonarlint/**,\
**/.vscode/**,\
.github/workflows/unit-tests.yml
# =============================================================================
# COVERAGE EXCLUSIONS
# =============================================================================
# Files to exclude from coverage calculations
sonar.coverage.exclusions=\
**/tests/**,\
**/.tox/**,\
**/test_*.py,\
**/*_test.py,\
**/conftest.py,\
**/migrations/**,\
**/settings*.py,\
**/defaults.py,\
**/grpc_defaults.py,\
**/manage.py,\
**/wsgi.py,\
**/asgi.py,\
**/__main__.py
# =============================================================================
# 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