You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/OutputParserTest.groovy
+55-3
Original file line number
Diff line number
Diff line change
@@ -21,14 +21,66 @@ class OutputParserTest {
21
21
publicvoidredirectNonJsonInput() {
22
22
parser.out.print("This is a warning")
23
23
assert out.toString("UTF-8").isEmpty()
24
-
assert"This is a warning", err.toString("UTF-8")
24
+
assertEquals"This is a warning", err.toString("UTF-8")
25
25
}
26
26
27
27
@Test
28
28
publicvoidprintJsonLines() {
29
29
parser.out.print("{}")
30
30
assert err.toString("UTF-8").isEmpty()
31
-
assert"{}", out.toString("UTF-8")
31
+
assertEquals"{}", out.toString("UTF-8")
32
32
}
33
-
}
34
33
34
+
@Test
35
+
publicvoidremoveDeveloperPropertiesFromReadup() {
36
+
def issue ='''
37
+
{
38
+
"type": "issue",
39
+
"check_name": "AvoidMultipleUnaryOperators",
40
+
"description": "Using multiple unary operators may be a bug, and/or is confusing.",
41
+
"content": {
42
+
"body": "## AvoidMultipleUnaryOperators\n\nSince: PMD 4.2\n\nPriority: Medium High\n\n[Categories](https://github.com/codeclimate/spec/blob/master/SPEC.md#categories): Style\n\n[Remediation Points](https://github.com/codeclimate/spec/blob/master/SPEC.md#remediation-points): 50000\n\nThe use of multiple unary operators may be problematic, and/or confusing. Ensure that the intended usage is not a bug, or consider simplifying the expression.\n\n### Example:\n\n```java\n\n\n// These are typo bugs, or at best needlessly complex and confusing:\nint i = - -1;\nint j = + - +1;\nint z = ~~2;\nboolean b = !!true;\nboolean c = !!!true;\n\n// These are better:\nint i = 1;\nint j = -1;\nint z = 2;\nboolean b = true;\nboolean c = false;\n\n// And these just make your brain hurt:\nint i = ~-2;\nint j = -~7;\n\n \n``` \n\n### [PMD properties](http://pmd.github.io/pmd-6.0.1/customizing/pmd-developer.html)\n\nName | Value | Description\n--- | --- | ---\nviolationSuppressRegex | | Suppress violations with messages matching a regular expression\nviolationSuppressXPath | | Suppress violations on nodes which match a given relative XPath expression.\n"
"description": "Using multiple unary operators may be a bug, and/or is confusing.",
63
+
"content": {
64
+
"body": "## AvoidMultipleUnaryOperators\n\nSince: PMD 4.2\n\nPriority: Medium High\n\n[Categories](https://github.com/codeclimate/spec/blob/master/SPEC.md#categories): Style\n\n[Remediation Points](https://github.com/codeclimate/spec/blob/master/SPEC.md#remediation-points): 50000\n\nThe use of multiple unary operators may be problematic, and/or confusing. Ensure that the intended usage is not a bug, or consider simplifying the expression.\n\n### Example:\n\n```java\n\n\n// These are typo bugs, or at best needlessly complex and confusing:\nint i = - -1;\nint j = + - +1;\nint z = ~~2;\nboolean b = !!true;\nboolean c = !!!true;\n\n// These are better:\nint i = 1;\nint j = -1;\nint z = 2;\nboolean b = true;\nboolean c = false;\n\n// And these just make your brain hurt:\nint i = ~-2;\nint j = -~7;\n\n\n``` \n\n"
0 commit comments