summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorDavid Gageot <david@gageot.net>2012-09-21 10:23:37 +0200
committerDavid Gageot <david@gageot.net>2012-09-21 12:26:14 +0200
commit90f65c869c857e5f548bc67ed779aeb465e2cb2f (patch)
treede8dd8770f4343d00af381f281ef4f60bc255d40 /plugins
parent2b7540abc629bdb71430a454da36552d3cc0cf13 (diff)
downloadsonarqube-90f65c869c857e5f548bc67ed779aeb465e2cb2f.tar.gz
sonarqube-90f65c869c857e5f548bc67ed779aeb465e2cb2f.zip
SONAR-3750 Add ability to share Exclusion rules between several projects
Diffstat (limited to 'plugins')
-rw-r--r--plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/CorePlugin.java8
-rw-r--r--plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties77
2 files changed, 85 insertions, 0 deletions
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/CorePlugin.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/CorePlugin.java
index af0279a478d..5fcbd453d73 100644
--- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/CorePlugin.java
+++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/CorePlugin.java
@@ -131,6 +131,14 @@ import java.util.List;
global = true,
category = CoreProperties.CATEGORY_GENERAL),
@Property(
+ key = CoreProperties.PROJECT_EXCLUSIONS_PROPERTY,
+ name = "Exclusions",
+ description = "Exclude sources from code analysis. Changes will be applied during next code analysis.",
+ project = true,
+ global = false,
+ multiValues = true,
+ category = CoreProperties.CATEGORY_EXCLUSIONS),
+ @Property(
key = CoreProperties.CORE_COVERAGE_PLUGIN_PROPERTY,
defaultValue = "jacoco",
name = "Code coverage plugin",
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties
index d684f7b7e59..4c32642d609 100644
--- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties
+++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties
@@ -576,6 +576,83 @@ property.category.codeCoverage=Code Coverage
property.category.duplications=Duplications
property.category.localization=Localization
property.category.server_id=Server ID
+property.category.exclusions=Exclusions
+property.sonar.exclusions.name=Exclusions
+property.sonar.exclusions.description=Exclude sources from code analysis. Changes will be applied during next code analysis.
+property.sonar.exclusions.help=<h2>Wildcards</h2>\
+ <p>Following rules are applied:</p>\
+ <table class="data">\
+ <thead><tr><th colspan="2"></th></tr></thead>\
+ <tr class="odd">\
+ <td>*</td>\
+ <td>Match zero or more characters</td>\
+ </tr>\
+ <tr class="even">\
+ <td>**</td>\
+ <td>Match zero or more directories</td>\
+ </tr>\
+ <tr class="odd">\
+ <td>?</td>\
+ <td>Match a single character</td>\
+ </tr>\
+ </table>\
+ <p>Examples:</p>\
+ <table class="data">\
+ <thead><tr><th>Filter</th><th>Description</th><th>Matches</th></tr></thead>\
+ <tr class="odd">\
+ <td>org/mycompany/*.java</td>\
+ <td>matches all <code>.java</code> files in the <code>org/mycompany</code> directory</td>\
+ <td>\
+ <ul>\
+ <li>org/mycompany/Foo.java</li>\
+ <li>org/mycompany/Bar.java</li>\
+ </ul>\
+ </td>\
+ </tr>\
+ <tr class="even">\
+ <td>org/*Model*.java</td>\
+ <td>matches all <code>.java</code> files with <code>Model</code> in filename and in the<code>org</code> directory</td>\
+ <td>\
+ <ul>\
+ <li>org/Model.java</li>\
+ <li>org/FirstModel.java</li>\
+ <li>org/ModelTest.java</li>\
+ </ul>\
+ </td>\
+ </tr>\
+ <tr class="odd">\
+ <td>org/**</td>\
+ <td>matches all files underneath the <code>org</code> directory</td>\
+ <td>\
+ <ul>\
+ <li>org/Foo.java</li>\
+ <li>org/foo/bar.jsp</li>\
+ </ul>\
+ </td>\
+ </tr>\
+ <tr class="even">\
+ <td>org/**/Dummy.java</td>\
+ <td>matches all <code>Dummy.java</code> files underneath the <code>org</code> directory</td>\
+ <td>\
+ <ul>\
+ <li>org/Dummy.java</li>\
+ <li>org/foo/Dummy.java</li>\
+ <li>org/foo/bar/Dummy.java</li>\
+ </ul>\
+ </td>\
+ </tr>\
+ <tr class="odd">\
+ <td>org/**/*.java</td>\
+ <td>matches all <code>.java</code> files underneath the <code>org</code> directory</td>\
+ <td>\
+ <ul>\
+ <li>org/Foo.java</li>\
+ <li>org/foo/Bar.java</li>\
+ <li>org/foo/bar/Baz.java</li>\
+ </ul>\
+ </td>\
+ </tr>\
+ </table>
property.error.notBoolean=Valid options are "true" and "false"
property.error.notInteger=Only digits are allowed