From dc3082719ba7748ce0d49a93840b9f8a27948150 Mon Sep 17 00:00:00 2001 From: Daniel Schwarz Date: Fri, 3 Feb 2017 15:48:26 +0100 Subject: [PATCH] SONAR-8736 add missing createdAt in example response ws/rules/search --- .../resources/org/sonar/server/rule/ws/example-search.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/sonar-server/src/main/resources/org/sonar/server/rule/ws/example-search.json b/server/sonar-server/src/main/resources/org/sonar/server/rule/ws/example-search.json index 66e05d1a969..174745cdbbf 100644 --- a/server/sonar-server/src/main/resources/org/sonar/server/rule/ws/example-search.json +++ b/server/sonar-server/src/main/resources/org/sonar/server/rule/ws/example-search.json @@ -7,6 +7,7 @@ "key": "squid:S1067", "repo": "squid", "name": "Expressions should not be too complex", + "createdAt": "2013-03-27T08:52:40+0100", "htmlDesc": "

\nThe complexity of an expression is defined by the number of &&, || and condition ? ifTrue : ifFalse operators it contains.\nA single expression's complexity should not become too high to keep the code readable.\n

\n\n

The following code, with a maximum complexity of 3:

\n\n
\nif (condition1 && condition2 && condition3 && condition4) { /* ... */ }  // Non-Compliant\n
\n\n

could be refactored into something like:

\n\n
\nif (relevantMethodName1() && relevantMethodName2()) { /* ... */ }        // Compliant\n\n/* ... */\n\nprivate boolean relevantMethodName1() {\n  return condition1 && condition2;\n}\n\nprivate boolean relevantMethodName2() {\n  return condition3 && condition4;\n}\n
", "severity": "MAJOR", "status": "READY", @@ -29,6 +30,7 @@ "key": "squid:ClassCyclomaticComplexity", "repo": "squid", "name": "Avoid too complex class", + "createdAt": "2013-03-27T08:52:40+0100", "htmlDesc": "

The Cyclomatic Complexity is measured by the number of (&&, ||)\n\toperators and (if, while, do, for, ?:, catch, switch, case, return,\n\tthrow) statements in the body of a class plus one for each constructor,\n\tmethod (but not getter/setter), static initializer, or instance\n\tinitializer in the class. The last return stament in method, if exists,\n\tis not taken into account.

\n

\n\tEven when the Cyclomatic Complexity of a class is very high, this\n\tcomplexity might be well distributed among all methods. Nevertheless,\n\tmost of the time, a very complex class is a class which breaks the Single\n\t\tResponsibility Principle and which should be re-factored to be split\n\tin several classes.\n

", "severity": "MAJOR", "status": "READY", @@ -51,6 +53,7 @@ "key": "squid:MethodCyclomaticComplexity", "repo": "squid", "name": "Methods should not be too complex", + "createdAt": "2013-03-27T08:52:40+0100", "htmlDesc": "

The Cyclomatic Complexity is measured by the number of\n\t(&&, ||) operators and (if, while, do, for, ?:, catch, switch,\n\tcase, return, throw) statements in the body of a class plus one for\n\teach constructor, method (but not getter/setter), static initializer,\n\tor instance initializer in the class. The last return stament in\n\tmethod, if exists, is not taken into account.

\n

\n\tEven when the Cyclomatic Complexity of a class is very high, this\n\tcomplexity might be well distributed among all methods. Nevertheless,\n\tmost of the time, a very complex class is a class which breaks the Single\n\t\tResponsibility Principle and which should be re-factored to be split\n\tin several classes.\n

", "severity": "MAJOR", "status": "READY", -- 2.39.5