-
Notifications
You must be signed in to change notification settings - Fork 56
/
Copy path.sonarcloud.properties
53 lines (40 loc) · 2.14 KB
/
.sonarcloud.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
# Configuration file for SonarCloud
sonar.host.url=https://sonarcloud.io
sonar.organization=scalyr
sonar.projectKey=scalyr_scalyr-agent-2
# NOTE: If we don't specify a language, sonar will try to detect and work with
# multiple languages (which is desired for most repos)
sonar.language=python
# Path to the main source code we want to scan
sonar.sources=scalyr_agent/
# Path to tests
sonar.tests=tests/unit,tests/smoke_tests,tests/distribution,tests/ami
# Exclude bundled third party libs from analysis
sonar.exclusions=scalyr_agent/third_party/**,scalyr_agent/third_party_tls/**,scalyr_agent/third_party_python2/**
# Code Duplication ignores rules
# For now we simply ignore all the paths because there are too many false positives due to the
# license headers and "__define__metrics" line which we can't easily ignore
#sonar.cpd.exclusions=**
sonar.cpd.exclusions=scalyr_agent/builtin_monitors/*.py
#sonar.cpd.python.minimumTokens=200
#sonar.cpd.python.minimumLines=20
# Python programming language specific settings
# Use our custom pylint config
#sonar.python.pylint_config=./lint-configs/python/.pylintrc
# TODO: Once we switch to Circle CI integration, parse pylint report from our
# tox invocation, same for bandit
#sonar.python.pylint.reportPath=pylint-report.txt
#sonar.python.bandit.reportPaths=bandit-report.json
# Coverage related settings - currently unused (we use codecov.io for coverage)
# NOTE: Sonar requires all the coverage reports to be combined into a single
# report
sonar.python.coverage.reportPaths=coverage.xml
# This matches paths in .coveragerc file
sonar.coverage.exclusions=scalyr_agent/platform_tests/**,tests/ami/**,tests/distribution/**,tests/distribution_builders/**,tests/image_builder/**,**/tests/ami/**,**/tests/distribution/**,**/tests/distribution_builders/**,**tests/image_builder/**
#sonar.python.xunit.reportPath=test-results/junit-*.xml
# Custom rule settings
# We ignore "Functions, methods and lambdas should not have too many parameters"
# rule which conflicts with our linter rule
sonar.issue.ignore.multicriteria=e1
sonar.issue.ignore.multicriteria.e1.ruleKey=python:S107
sonar.issue.ignore.multicriteria.e1.resourceKey=**/*.py