![]() ![]() If you are using the SonarScanner CLI it is, by default, the current directory in which you invoke the tool (though this can be overridden using the parameter sonar.projectBaseDir). In most cases this is the root directory of the project. The base directory is defined by the scanner you are using. The paths are interpreted relative to the project base directory.An individual file in the list means that file is included. A directory in the list means that all analyzable files and directories recursively below it are included.The entries in the list are simple paths.When explicitly set, both sonar.sources and sonar.tests take a comma-delimited list of directories or files. If the defaults are not suitable (for example, if you do have test code, which you should!), you have to set these parameters by key in the scanner invocation or the appropriate configuration file (see Analysis Parameters for details). The parameters sonar.sources and sonar.tests are only settable by key in configuration files or on the command line, not in the SonarCloud UI. sonar.tests defaults to null, meaning there is assumed to be no test code.By default, sonar.sources is set to the current working directory (ie: the path.NET (including both CI-based analysis and automatic analysis): Using the parameters explicitly will override these defaults (for example, in your pom.xml, in the case of Maven). ![]() NET then sonar.sources and sonar.tests are set automatically based on your project configuration. If you are analyzing code using SonarScanner for Maven, SonarScanner for Gradle or SonarScanner for. Test and non-test code are distinguished because different analysis rules are applied to each category the two categories have different metrics.Īdditionally, test code does not counts toward your lines of code (LOC) usage in paid SonarCloud accounts and does not count toward coverage (you don’t have to test your test code).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |