# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 # Note: Currently testing and supported with code coverage sonarqube # collection for python lambda (python pytest, python unittest) and javascript jest # and CDK TypeScript # Refer to https://docs.sonarqube.org/latest/project-administration/narrowing-the-focus/ # for details on sources and exclusions. Note also .gitignore # TODO: customize sonar.tests if needed. Currently source/tests and source are not mutually exclusive sonar.sources= source, deployment # Focusing sonarqube analysis on non test code first and reducing noise from analysis of test code. Projects # can extend analysis to test code at a later stage. # - The deployment/*-assets/** directory for this solution includes glue source code which is already scanned # as part of the source scan. Therefore, excluding them from rescan under deployment (avoids false calculation # for duplicate, unit test coverage) sonar.exclusions= \ **/test/**, \ **/tests/**, \ deployment/*.yaml, \ deployment/**/*.yaml, \ deployment/*-assets/**, \ **/*.html, \ source/infrastructure/cdk.out/*, \ source/cdk_solution_helper_py/**, \ source/website/**, \ source/api/**, \ source/glue/**, \ source/snap_setup/**, \ source/helper/**, \ **/setup.py sonar.sourceEncoding=UTF-8 ## Python Specific Properties* # coverage # https://docs.sonarqube.org/pages/viewpage.action?pageId=4784149 # Comma-separated list of ant pattern describing paths to coverage reports, relative to projects # root. Leave unset to use the default ("coverage-reports/*coverage-*.xml"). sonar.python.coverage.reportPaths=source/tests/coverage-reports/*.coverage.xml # Uncomment to enable debugging by default # sonar.verbose=true # sonar.log.level=DEBUG # Disable if needed # sonar.scm.disabled=true