diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2010-09-23 13:29:43 +0000 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2010-09-23 13:29:43 +0000 |
commit | f908b8b900e51728bbf04291e5d241e0317a18d0 (patch) | |
tree | 3b7f2d4114b987f369a5447c0371edd9224c10ef /sonar-check-api/src/main/java/org/sonar/check/Rule.java | |
parent | 28a97998eb8ea682d47c286e3d0ac59976d17dc8 (diff) | |
download | sonarqube-f908b8b900e51728bbf04291e5d241e0317a18d0.tar.gz sonarqube-f908b8b900e51728bbf04291e5d241e0317a18d0.zip |
add the package org.sonar.api.checks in order to implement its own rules engine
Diffstat (limited to 'sonar-check-api/src/main/java/org/sonar/check/Rule.java')
-rw-r--r-- | sonar-check-api/src/main/java/org/sonar/check/Rule.java | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/sonar-check-api/src/main/java/org/sonar/check/Rule.java b/sonar-check-api/src/main/java/org/sonar/check/Rule.java new file mode 100644 index 00000000000..2b072ccbfa0 --- /dev/null +++ b/sonar-check-api/src/main/java/org/sonar/check/Rule.java @@ -0,0 +1,58 @@ +/* + * Sonar, open source software quality management tool. + * Copyright (C) 2009 SonarSource SA + * mailto:contact AT sonarsource DOT com + * + * Sonar is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Sonar is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.check; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * @since 2.3 + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) +public @interface Rule { + + /** + * The default key is the class name. + */ + String key() default ""; + + /** + * The rule name. If not defined, then the name is the key + */ + String name() default ""; + + /** + * The description, optional. + */ + String description() default ""; + + /** + * Default priority. + */ + Priority priority() default Priority.MAJOR; + + /** + * Will probably be deprecated and replaced by tags + */ + IsoCategory isoCategory(); +} |