123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180 |
- // SonarQube, open source software quality management tool.
- // Copyright (C) 2008-2016 SonarSource
- // mailto:contact AT sonarsource DOT com
- //
- // SonarQube 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.
- //
- // SonarQube 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 this program; if not, write to the Free Software Foundation,
- // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
- syntax = "proto2";
-
- package sonarqube.ws.rules;
-
- import "ws-commons.proto";
-
- option java_package = "org.sonarqube.ws";
- option java_outer_classname = "Rules";
- option optimize_for = SPEED;
-
- // WS api/rules/list for internal use only
- message ListResponse {
-
- message Rule {
- optional string repository = 1;
- optional string key = 2;
- optional string internal_key = 3;
- optional string name = 4;
- }
-
- repeated Rule rules = 1;
- }
-
- // WS api/rules/search
- message SearchResponse {
- optional int64 total = 1;
- optional int32 p = 2;
- optional int64 ps = 3;
- repeated Rule rules = 4;
- optional Actives actives = 5;
- optional QProfiles qProfiles = 6;
- optional sonarqube.ws.commons.Facets facets = 7;
- }
-
- //WS api/rules/show
- message ShowResponse {
- optional Rule rule = 1;
- repeated Active actives = 3;
- }
-
- //WS api/rules/create
- message CreateResponse {
- optional Rule rule = 1;
- }
-
- //WS api/rules/update
- message UpdateResponse {
- optional Rule rule = 1;
- }
-
- message Rule {
- optional string key = 1;
- optional string repo = 2;
- optional string name = 3;
- optional string createdAt = 4;
- optional string htmlDesc = 5;
- optional string htmlNote = 6;
- optional string mdDesc = 7;
- optional string mdNote = 8;
- optional string noteLogin = 9;
- optional string severity = 10;
- optional sonarqube.ws.commons.RuleStatus status = 11;
- optional string internalKey = 12;
- optional bool isTemplate = 13;
- optional string templateKey = 14;
- optional Tags tags = 15;
- optional SysTags sysTags = 16;
- optional string lang = 19;
- optional string langName = 20;
- optional Params params = 21;
- // characteristic fields, unsupported since 5.5
- optional string unusedDefaultDebtChar = 23;
- optional string unusedDefaultDebtSubChar = 24;
- optional string unusedDebtChar = 25;
- optional string unusedDebtSubChar = 26;
- optional string unusedDebtCharName = 27;
- optional string unusedDebtSubCharName = 28;
-
- // Deprecated since 5.5, replaced by defaultRemFnType
- optional string defaultDebtRemFnType = 29;
- // Deprecated since 5.5, replaced by defaultRemFnGapMultiplier
- optional string defaultDebtRemFnCoeff = 30;
- // Deprecated since 5.5, replaced by defaultRemFnBaseEffort
- optional string defaultDebtRemFnOffset = 31;
- // Deprecated since 5.5, replaced by gapDescription
- optional string effortToFixDescription = 32;
- // Deprecated since 5.5, replaced by remFnOverloaded
- optional bool debtOverloaded = 33;
- // Deprecated since 5.5, replaced by remFnType
- optional string debtRemFnType = 34;
- // Deprecated since 5.5, replaced by remFnGapMultiplier
- optional string debtRemFnCoeff = 35;
- // Deprecated since 5.5, replaced by remFnBaseEffort
- optional string debtRemFnOffset = 36;
-
- optional string defaultRemFnType = 38;
- optional string defaultRemFnGapMultiplier = 39;
- optional string defaultRemFnBaseEffort = 40;
- optional string remFnType = 41;
- optional string remFnGapMultiplier = 42;
- optional string remFnBaseEffort = 43;
- optional bool remFnOverloaded = 45;
- optional string gapDescription = 44;
- optional sonarqube.ws.commons.RuleScope scope = 46;
- optional bool isExternal = 47;
-
- optional sonarqube.ws.commons.RuleType type = 37;
-
- message Params {
- repeated Param params = 1;
- }
-
- message Param {
- optional string key = 1;
- optional string htmlDesc = 2;
- optional string defaultValue = 3;
- optional string type = 4;
- }
- }
-
- message SysTags {
- repeated string sysTags = 1;
- }
-
- message Tags {
- repeated string tags = 1;
- }
-
- message Actives {
- map<string, ActiveList> actives = 1;
- }
-
- message ActiveList {
- repeated Active activeList = 1;
- }
-
- message Active {
- optional string qProfile = 1;
- optional string inherit = 2;
- optional string severity = 3;
- // Unused since 5.6, it has been removed because it was never used and costly to compute
- optional string unusedParent = 4;
- repeated Param params = 5;
- optional string createdAt = 6;
- optional string updatedAt = 7;
-
- message Param {
- optional string key = 1;
- optional string value = 2;
- }
- }
-
- message QProfiles {
- map<string,QProfile> qProfiles = 1;
- }
-
- message QProfile {
- optional string name = 1;
- optional string lang = 2;
- optional string langName = 3;
- optional string parent = 4;
- }
|