diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..54a12f8 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,30 @@ +# SPDX-FileCopyrightText: Contributors to the Power Grid Model project +# +# SPDX-License-Identifier: MPL-2.0 + +sonar.projectKey=PowerGridModel_power-grid-model-io-native +sonar.organization=powergridmodel + +# This is the name and version displayed in the SonarCloud UI. +sonar.projectName=power-grid-model-io-native +sonar.projectVersion=1.0 + +# include C++ and Python source file +# since the C++ part is header only, also include the C++ unit test .cpp file +sonar.sources=src,tests/c_api_tests,power_grid_model_io_native_c +sonar.tests=tests/unit +sonar.sourceEncoding=UTF-8 + + +# exclude C++ unit test .cpp file (with doctest.h) +sonar.issue.ignore.allfile=a1 +sonar.issue.ignore.allfile.a1.fileRegexp='.*#include.*doctest\.h[>"].*' +sonar.coverage.exclusions="tests/**/*" +sonar.cpd.exclusions="tests/**/*" +sonar.cfamily.threads=1 +sonar.coverageReportPaths=cpp_coverage.xml + +# python +sonar.python.version=3 +sonar.python.coverage.reportPaths=python_coverage.xml +