-
Notifications
You must be signed in to change notification settings - Fork 7
/
sonar-project.properties
57 lines (49 loc) · 2.56 KB
/
sonar-project.properties
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
# General setup
sonar.projectKey=City-of-Helsinki_tilavarauspalvelu-core
sonar.organization=city-of-helsinki
sonar.python.version=3.11
# All paths are relative to the 'sonar-project.properties' file.
# Source for scanning
sonar.source=./
# Path globs to files excluded from scanning
sonar.exclusions=**tests**/*,**migrations**/*,**Dockerfile*,**docker-compose*,config/settings.py
# Path globs to files excluded from coverage
sonar.coverage.exclusions=**tests**/*,**migrations**/*,**admin**/*,config/settings.py,manage.py,local_settings_example.py
# Path to coverage file generated in GitHub Actions
sonar.python.coverage.reportPaths=coverage.xml
# Path globs to all test files
sonar.test.inclusions=**tests**/*
# Set up rule ignores
sonar.issue.ignore.multicriteria=e1,e2,e3,e4,e5,e6,e7,e8,e9
# Pseudorandom number generators are safe here
sonar.issue.ignore.multicriteria.e1.ruleKey=python:S2245
sonar.issue.ignore.multicriteria.e1.resourceKey=**/*/management/commands/**/*.py
# Ignore regex safety checks in all python files
sonar.issue.ignore.multicriteria.e2.ruleKey=python:S4784
sonar.issue.ignore.multicriteria.e2.resourceKey=**/*.py
# TODO comments can be left in code
sonar.issue.ignore.multicriteria.e3.ruleKey=python:S1135
sonar.issue.ignore.multicriteria.e3.resourceKey=**/*.py
# TODO comments do not need reference to the person who wrote them
sonar.issue.ignore.multicriteria.e4.ruleKey=python:S1707
sonar.issue.ignore.multicriteria.e4.resourceKey=**/*.py
# First argument of instance methods can be other than 'self'.
# We do this for GraphQL ObjectTypes, since their instance methods are
# by default static, and self refers to either the parent element or
# the Django model the ObjectType is based on.
sonar.issue.ignore.multicriteria.e5.ruleKey=python:S5720
sonar.issue.ignore.multicriteria.e5.resourceKey=**/*.py
# String literals can be duplicated
sonar.issue.ignore.multicriteria.e6.ruleKey=python:S1192
sonar.issue.ignore.multicriteria.e6.resourceKey=**/*.py
# Functions can have more than 3 yields/returns
sonar.issue.ignore.multicriteria.e7.ruleKey=python:S1142
sonar.issue.ignore.multicriteria.e7.resourceKey=**/*.py
# Functions can have unused parameters, e.g., GraphQL resolvers
# must have the info-parameter even if it's not used.
sonar.issue.ignore.multicriteria.e8.ruleKey=python:S1172
sonar.issue.ignore.multicriteria.e8.resourceKey=**/*.py
# Lookup properties are static methods, but static SonarCloud doesn't
# recognize them as such. Ignore this rule for this reason.
sonar.issue.ignore.multicriteria.e9.ruleKey=python:S5719
sonar.issue.ignore.multicriteria.e9.resourceKey=**/*.py