|
1 | | -# Note: Currently testing and supported with code coverage sonarqube |
2 | | -# collection for python lambda (python pytest, python unittest) and javascript jest |
3 | | -# and CDK TypeScript |
| 1 | +# scan templates in cdk.out even though they are in .gitignore |
| 2 | +sonar.scm.exclusions.disabled = true |
4 | 3 |
|
5 | | -# Uncomment to enable debugging by default |
6 | | -# sonar.verbose=true |
7 | | -# sonar.log.level=DEBUG |
| 4 | +sonar.sources = source/ |
8 | 5 |
|
9 | | -# Disable if needed |
10 | | -sonar.scm.disabled=true |
| 6 | +sonar.exclusions = \ |
| 7 | + **/test/**/*, \ |
| 8 | + source/jest.config.ts, \ |
| 9 | + source/coverage/**/* |
11 | 10 |
|
12 | | -# |
13 | | -# Refer to https://docs.sonarqube.org/latest/project-administration/narrowing-the-focus/ |
14 | | -# for details on sources and exclusions. Note also .gitignore |
15 | | -# |
16 | | -sonar.sources= \ |
17 | | - source |
| 11 | +sonar.tests = \ |
| 12 | + source/LambdaLayers/test/, \ |
| 13 | + source/Orchestrator/test/, \ |
| 14 | + source/playbooks/AFSBP/test/, \ |
| 15 | + source/playbooks/AFSBP/ssmdocs/scripts/test/, \ |
| 16 | + source/playbooks/CIS120/test/, \ |
| 17 | + source/playbooks/CIS140/test/, \ |
| 18 | + source/playbooks/common/test/, \ |
| 19 | + source/playbooks/NEWPLAYBOOK/test/, \ |
| 20 | + source/playbooks/NEWPLAYBOOK/ssmdocs/scripts/test/, \ |
| 21 | + source/playbooks/PCI321/test/, \ |
| 22 | + source/playbooks/PCI321/ssmdocs/scripts/test/, \ |
| 23 | + source/playbooks/SC/test/, \ |
| 24 | + source/playbooks/SC/ssmdocs/scripts/test/, \ |
| 25 | + source/remediation_runbooks/scripts/test/, \ |
| 26 | + source/solution_deploy/source/test/, \ |
| 27 | + source/test/ |
18 | 28 |
|
19 | | -# LambdaLayers modules are excluded from lambda folders, where they must be copied for testing |
20 | | -# These files are tested in LambdaLayers |
21 | | -sonar.exclusions= \ |
22 | | - **/test/**, \ |
23 | | - **/tests/**, \ |
24 | | - **/node_modules/**, \ |
25 | | - **/python_tests/**, \ |
26 | | - **/jest.config.js, \ |
27 | | - source/**.js, \ |
28 | | - deployment/build/**, \ |
29 | | - **/requests/**, \ |
30 | | - **/charset_normalizer/**, \ |
31 | | - **/chardet/**, \ |
32 | | - **/urllib3/**, \ |
33 | | - **/idna/**, \ |
34 | | - **/certifi/**, \ |
35 | | - **/coverage/**, \ |
36 | | - **/bin/*.ts, \ |
37 | | - deployment/temp/**, \ |
38 | | - simtest/** |
39 | | - |
40 | | -sonar.tests= \ |
41 | | - source/Orchestrator/test, \ |
42 | | - source/test, \ |
43 | | - source/LambdaLayers/test, \ |
44 | | - source/playbooks/AFSBP/test, \ |
45 | | - source/playbooks/AFSBP/ssmdocs/scripts/test, \ |
46 | | - source/playbooks/CIS120/test, \ |
47 | | - source/playbooks/PCI321/test, \ |
48 | | - source/playbooks/PCI321/ssmdocs/scripts/test, \ |
49 | | - source/solution_deploy/source/test, \ |
50 | | - source/remediation_runbooks/scripts/test |
| 29 | +sonar.python.version = 3.8, 3.9, 3.10, 3.11 |
| 30 | +sonar.python.coverage.reportPaths = deployment/test/coverage-reports/*.coverage.xml |
51 | 31 |
|
52 | | -sonar.sourceEncoding=UTF-8 |
| 32 | +sonar.javascript.lcov.reportPaths = source/coverage/lcov.info |
53 | 33 |
|
54 | | -## Python Specific Properties* |
55 | | -# coverage |
56 | | -# https://docs.sonarqube.org/pages/viewpage.action?pageId=4784149 |
57 | | -# Comma-separated list of ant pattern describing paths to coverage reports, relative to projects |
58 | | -# root. Leave unset to use the default ("coverage-reports/*coverage-*.xml"). |
59 | | -sonar.python.coverage.reportPaths=deployment/test/coverage-reports/*.coverage.xml |
60 | | - |
61 | | -# Sensor SonarJS Coverage [javascript] was not allowing globbing |
62 | | -# for sonar.javascript.lcov.reportPaths such as this |
63 | | -# source/test/coverage-reports/jest/*/lcov.info |
64 | | -# so we have to provide an explicit list of reportPaths |
65 | | -sonar.javascript.lcov.reportPaths= \ |
66 | | - source/coverage/lcov.info |
| 34 | +sonar.issue.ignore.multicriteria = ts1 |
| 35 | +sonar.issue.ignore.multicriteria.ts1.ruleKey = typescript:S1848 |
| 36 | +sonar.issue.ignore.multicriteria.ts1.resourceKey = **/*.ts |
0 commit comments