// 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 { repeated Rule rules = 1; optional Actives actives = 2; optional QProfiles qProfiles = 3; optional sonarqube.ws.commons.Paging paging = 4; } // WS api/rules/search message SearchResponse { optional int64 total = 1 [deprecated = true]; optional int32 p = 2 [deprecated = true]; optional int64 ps = 3 [deprecated = true]; repeated Rule rules = 4; optional Actives actives = 5; optional QProfiles qProfiles = 6; optional sonarqube.ws.commons.Facets facets = 7; optional sonarqube.ws.commons.Paging paging = 8; } //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 [deprecated = true]; optional string htmlNote = 6; optional string mdDesc = 7; optional string mdNote = 8; optional string noteLogin = 9; // Deprecated since 10.2, replace by impacts optional string severity = 10 [deprecated = true]; 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 10.0, replaced by defaultRemFnType optional string defaultDebtRemFnType = 29 [deprecated = true]; reserved 30; reserved 31; reserved 32; reserved 33; // Deprecated since 10.0, replaced by remFnType optional string debtRemFnType = 34 [deprecated = true]; reserved 35; reserved 36; // Deprecated since 10.2, replace by impacts optional sonarqube.ws.commons.RuleType type = 37 [deprecated = true]; 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 DeprecatedKeys deprecatedKeys = 48; optional DescriptionSections descriptionSections = 49; optional EducationPrinciples educationPrinciples = 50; optional string updatedAt = 51; optional sonarqube.ws.commons.CleanCodeAttribute cleanCodeAttribute = 52; optional sonarqube.ws.commons.CleanCodeAttributeCategory cleanCodeAttributeCategory = 53; optional Impacts impacts = 54; message DescriptionSections { repeated DescriptionSection descriptionSections = 1; } message DescriptionSection { required string key = 1; required string content = 2; optional Context context = 3; message Context { required string displayName = 1; required string key = 2; } } 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 Impacts{ repeated sonarqube.ws.commons.Impact impacts = 1; } message DeprecatedKeys { repeated string deprecatedKey = 1; } message SysTags { repeated string sysTags = 1; } message Tags { repeated string tags = 1; } message EducationPrinciples { repeated string educationPrinciples = 1; } message Actives { map 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 qProfiles = 1; } message QProfile { optional string name = 1; optional string lang = 2; optional string langName = 3; optional string parent = 4; }