# must be unique in a given SonarQube instance
sonar.projectKey=quota-monitor-for-aws

# --- optional properties ---

# Suppress the warning that Sonarqube can't autodetect the source code management system for this project
sonar.scm.disabled=true

# defaults to project key
sonar.projectName=quota-monitor-for-aws

# defaults to 'not provided'
sonar.projectVersion=6.0.0

# Encoding of the source code. Default is default system encoding
sonar.sourceEncoding=UTF-8

# Path is relative to the sonar-project.properties file. Defaults to .
sonar.sources= \
    source

# List of top level directories where the Scanner will search recursively for tests files
sonar.tests= \
    source

# Within the directories defined by sonar.tests, subset of files that will be considered as tests
sonar.test.inclusions= \
    **/*.test.ts, \
    **/*.config.ts, \
    **/*.setup.ts \
    **/*.spec.ts

# Exclude following files from Sonarqube reporting
sonar.exclusions= \
    **/*.js, \
    **/coverage/**, \
    **/__snapshots__/**

sonar.coverage.exclusions= \
    **/__tests__/*.*, \
    **/*.spec.ts, \
    **/jest.*.ts, \
    source/resources/bin/app.ts

# Comma-delimited list of paths to LCOV coverage report files. No wildcards allowed.
sonar.javascript.lcov.reportPaths= \
    source/resources/coverage/lcov.info, \
    source/lambda/utilsLayer/coverage/lcov.info, \
    source/lambda/services/cwPoller/coverage/lcov.info, \
    source/lambda/services/deploymentManager/coverage/lcov.info, \
    source/lambda/services/helper/coverage/lcov.info, \
    source/lambda/services/preReqManager/coverage/lcov.info, \
    source/lambda/services/quotaListManager/coverage/lcov.info, \
    source/lambda/services/reporter/coverage/lcov.info, \
    source/lambda/services/slackNotifier/coverage/lcov.info, \
    source/lambda/services/taRefresher/coverage/lcov.info

# Ignoring following issues, false warnings
sonar.issue.ignore.multicriteria=e1, e2
sonar.issue.ignore.multicriteria.e1.ruleKey=typescript:S1523
sonar.issue.ignore.multicriteria.e1.resourceKey=source/resources/**

# Ignore warning that objects are created and not being used.
# The CDK framework requires this object creation to generate the cf template.
# Ignore in CDK project code only, not in the lambda unction code.
sonar.issue.ignore.multicriteria.e2.ruleKey=typescript:S1848
sonar.issue.ignore.multicriteria.e2.resourceKey=source/resources/**/*.ts