From 1cea549f87284f5705ebe575f911adf0cdaf34f3 Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Fri, 8 Mar 2013 15:46:19 +0100 Subject: SONAR-3879 SONAR-4170 SONAR-3880 Add status, created_at and updated_at columns to Rules table --- .../src/main/java/org/sonar/check/Rule.java | 6 +++++ .../src/main/java/org/sonar/check/Status.java | 28 ++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 sonar-check-api/src/main/java/org/sonar/check/Status.java (limited to 'sonar-check-api') 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 index 62742720f1a..3c92139c720 100644 --- a/sonar-check-api/src/main/java/org/sonar/check/Rule.java +++ b/sonar-check-api/src/main/java/org/sonar/check/Rule.java @@ -60,4 +60,10 @@ public @interface Rule { IsoCategory isoCategory() default IsoCategory.NONE; Cardinality cardinality() default Cardinality.SINGLE; + + /** + * The rule status. Can be Normal, Beta or Deprecated + * @since 3.6 + */ + Status status() default Status.NORMAL; } diff --git a/sonar-check-api/src/main/java/org/sonar/check/Status.java b/sonar-check-api/src/main/java/org/sonar/check/Status.java new file mode 100644 index 00000000000..e8a1fd159ee --- /dev/null +++ b/sonar-check-api/src/main/java/org/sonar/check/Status.java @@ -0,0 +1,28 @@ +/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2012 SonarSource + * 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; + +/** + * @since 3.6 + */ +public enum Status { + NORMAL, BETA, DEPRECATED +} -- cgit v1.2.3