diff options
author | Philippe Perrin <philippe.perrin@sonarsource.com> | 2019-10-23 15:30:10 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2019-10-24 20:21:11 +0200 |
commit | a631b1a1a41a9b35a535eab47b218556edfbff72 (patch) | |
tree | 98e865721c387366a1070bc4fc9b4bc52961a5ee /server/sonar-docs | |
parent | ef0ebf3bf3550fb8bbefe4220967ed2fbbecdce2 (diff) | |
download | sonarqube-a631b1a1a41a9b35a535eab47b218556edfbff72.tar.gz sonarqube-a631b1a1a41a9b35a535eab47b218556edfbff72.zip |
SONAR-12500 Help section in the "Analysis scope" settings page should be more visible
Diffstat (limited to 'server/sonar-docs')
-rw-r--r-- | server/sonar-docs/src/pages/project-administration/narrowing-the-focus.md | 50 |
1 files changed, 18 insertions, 32 deletions
diff --git a/server/sonar-docs/src/pages/project-administration/narrowing-the-focus.md b/server/sonar-docs/src/pages/project-administration/narrowing-the-focus.md index 9154ecd31de..286a48d6bf9 100644 --- a/server/sonar-docs/src/pages/project-administration/narrowing-the-focus.md +++ b/server/sonar-docs/src/pages/project-administration/narrowing-the-focus.md @@ -14,6 +14,23 @@ If {instance}'s results aren't relevant, no one will want to use it. That's why You can make these changes globally or at a project level. At both levels, the navigation path is the same: **Administration > General Settings > Analysis Scope**. +## Patterns + +Paths are relative to the project base directory. The following wildcards can be used: + +* `*` - Match zero or more characters +* `**` - Match zero or more directories +* `?` - Match a single character + +Relative paths are based on the fully qualified name of the component. + +Example|Matches|Does not match +----|----|---- +`**/*Bean.java`|org/sonar.api/MyBean.java <br/> org/sonar/util/MyOtherBean.java|org/sonar/util/MyDTO.java +`**/*Bean?.java`|org/sonar/util/MyOtherBean1.java|org/sonar/util/MyOtherBean.java <br/> org/sonar.api/MyBean.java <br/> org/sonar/util/MyDTO.java +`org/sonar/*`|org/sonar/MyClass.java <br/> org/sonar/MyOtherClass.java|org/sonar/util/MyClassUtil.java +`org/sonar/**/*`|org/sonar/MyClass.java <br/> org/sonar/MyOtherClass.java <br/> org/sonar/util/MyClassUtil.java| + ## Ignore Files We recommend that you exclude generated code, source code from libraries, etc. There are four different ways to narrow your analysis to the source code that will be relevant to the development team. You can combine them all together to tune your analysis scope. Additionally, we automatically exclude from analysis the files described in your projects' `.gitignore` files. This behavior can be disabled. See `sonar.scm.exclusions.disabled` in the [Analysis Parameters](/analysis/analysis-parameters/) page for details. @@ -116,35 +133,4 @@ To do so, go to **Administration > General Settings > Analysis Scope > Duplicati You can prevent some files from being taken into account for code coverage by unit tests. -To do so, go to **Administration > General Settings > Analysis Scope > Code Coverage** and set the *Coverage Exclusions* property. See the Patterns section for more details on the syntax. - -## Patterns - -Paths are relative to the project base directory. - -The following wildcards can be used: - -* `*` - zero or more characters -* `**` - zero or more directories -* `?` - a single character - -Relative paths are based on the fully qualified name of the component. - -Examples: - -`# Exclude all classes ending by "Bean"` -`# Matches org/sonar.api/MyBean.java, org/sonar/util/MyOtherBean.java, org/sonar/util/MyDTO.java, etc.` -`sonar.exclusions=**/*Bean.java,**/*DTO.java` - -`# Exclude all classes in the "src/main/java/org/sonar" directory` -`# Matches src/main/java/org/sonar/MyClass.java, src/main/java/org/sonar/MyOtherClass.java` -`# But does not match src/main/java/org/sonar/util/MyClassUtil.java` -`sonar.exclusions=src/main/java/org/sonar/*` - -`# Exclude all COBOL programs in the "bank" directory and its sub-directories` -`# Matches bank/ZTR00021.cbl, bank/data/CBR00354.cbl, bank/data/REM012345.cob` -`sonar.exclusions=bank/**/*` - -`# Exclude all COBOL programs in the "bank" directory and its sub-directories whose extension is .cbl` -`# Matches bank/ZTR00021.cbl, bank/data/CBR00354.cbl` -`sonar.exclusions=bank/**/*.cbl` +To do so, go to **Administration > General Settings > Analysis Scope > Code Coverage** and set the *Coverage Exclusions* property. See the Patterns section for more details on the syntax.
\ No newline at end of file |