# # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software distributed under the License is distributed # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for # the specific language governing permissions and limitations under the License. # # 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/ # 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= \ source/tests/**/*, \ source/**/tests/**/*, \ source/deployment/**/*, \ source/website/**/*, \ source/**/package/**/*, \ source/**/dist/**/* 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