|
| 1 | +{ |
| 2 | + "$schema": "https://json.schemastore.org/sarif-2.1.0.json", |
| 3 | + "version": "2.1.0", |
| 4 | + "runs": [ |
| 5 | + { |
| 6 | + "tool": { |
| 7 | + "driver": { |
| 8 | + "name": "PMD", |
| 9 | + "version": "7.12.0", |
| 10 | + "informationUri": "https://docs.pmd-code.org/latest/", |
| 11 | + "rules": [ |
| 12 | + { |
| 13 | + "id": "AtLeastOneConstructor", |
| 14 | + "shortDescription": { |
| 15 | + "text": "Each class should declare at least one constructor" |
| 16 | + }, |
| 17 | + "fullDescription": { |
| 18 | + "text": "\n\nEach non-static class should declare at least one constructor.\nClasses with solely static members are ignored, refer to [UseUtilityClassRule](pmd_rules_java_design.html#useutilityclass) to detect those.\n\n " |
| 19 | + }, |
| 20 | + "helpUri": "https://docs.pmd-code.org/pmd-doc-7.12.0/pmd_rules_java_codestyle.html#atleastoneconstructor", |
| 21 | + "help": { |
| 22 | + "text": "\n\nEach non-static class should declare at least one constructor.\nClasses with solely static members are ignored, refer to [UseUtilityClassRule](pmd_rules_java_design.html#useutilityclass) to detect those.\n\n " |
| 23 | + }, |
| 24 | + "properties": { |
| 25 | + "ruleset": "Code Style", |
| 26 | + "priority": 3, |
| 27 | + "tags": [ |
| 28 | + "Code Style" |
| 29 | + ] |
| 30 | + } |
| 31 | + }, |
| 32 | + { |
| 33 | + "id": "UnusedPrivateField", |
| 34 | + "shortDescription": { |
| 35 | + "text": "Avoid unused private fields such as 'x'." |
| 36 | + }, |
| 37 | + "fullDescription": { |
| 38 | + "text": "\nDetects when a private field is declared and/or assigned a value, but not used.\n\nSince PMD 6.50.0 private fields are ignored, if the fields are annotated with any annotation or the\nenclosing class has any annotation. Annotations often enable a framework (such as dependency injection, mocking\nor e.g. Lombok) which use the fields by reflection or other means. This usage can't be detected by static code analysis.\nPreviously these frameworks where explicitly allowed by listing their annotations in the property\n\"ignoredAnnotations\", but that turned out to be prone of false positive for any not explicitly considered framework.\n " |
| 39 | + }, |
| 40 | + "helpUri": "https://docs.pmd-code.org/pmd-doc-7.12.0/pmd_rules_java_bestpractices.html#unusedprivatefield", |
| 41 | + "help": { |
| 42 | + "text": "\nDetects when a private field is declared and/or assigned a value, but not used.\n\nSince PMD 6.50.0 private fields are ignored, if the fields are annotated with any annotation or the\nenclosing class has any annotation. Annotations often enable a framework (such as dependency injection, mocking\nor e.g. Lombok) which use the fields by reflection or other means. This usage can't be detected by static code analysis.\nPreviously these frameworks where explicitly allowed by listing their annotations in the property\n\"ignoredAnnotations\", but that turned out to be prone of false positive for any not explicitly considered framework.\n " |
| 43 | + }, |
| 44 | + "properties": { |
| 45 | + "ruleset": "Best Practices", |
| 46 | + "priority": 3, |
| 47 | + "tags": [ |
| 48 | + "Best Practices" |
| 49 | + ] |
| 50 | + } |
| 51 | + }, |
| 52 | + { |
| 53 | + "id": "ShortVariable", |
| 54 | + "shortDescription": { |
| 55 | + "text": "Avoid variables with short names like x" |
| 56 | + }, |
| 57 | + "fullDescription": { |
| 58 | + "text": "\nFields, local variables, enum constant names or parameter names that are very short are not helpful to the reader.\n " |
| 59 | + }, |
| 60 | + "helpUri": "https://docs.pmd-code.org/pmd-doc-7.12.0/pmd_rules_java_codestyle.html#shortvariable", |
| 61 | + "help": { |
| 62 | + "text": "\nFields, local variables, enum constant names or parameter names that are very short are not helpful to the reader.\n " |
| 63 | + }, |
| 64 | + "properties": { |
| 65 | + "ruleset": "Code Style", |
| 66 | + "priority": 3, |
| 67 | + "tags": [ |
| 68 | + "Code Style" |
| 69 | + ] |
| 70 | + } |
| 71 | + }, |
| 72 | + { |
| 73 | + "id": "CommentRequired", |
| 74 | + "shortDescription": { |
| 75 | + "text": "Field comments are required" |
| 76 | + }, |
| 77 | + "fullDescription": { |
| 78 | + "text": "\nDenotes whether javadoc (formal) comments are required (or unwanted) for specific language elements.\n " |
| 79 | + }, |
| 80 | + "helpUri": "https://docs.pmd-code.org/pmd-doc-7.12.0/pmd_rules_java_documentation.html#commentrequired", |
| 81 | + "help": { |
| 82 | + "text": "\nDenotes whether javadoc (formal) comments are required (or unwanted) for specific language elements.\n " |
| 83 | + }, |
| 84 | + "properties": { |
| 85 | + "ruleset": "Documentation", |
| 86 | + "priority": 3, |
| 87 | + "tags": [ |
| 88 | + "Documentation" |
| 89 | + ] |
| 90 | + } |
| 91 | + } |
| 92 | + ] |
| 93 | + } |
| 94 | + }, |
| 95 | + "results": [ |
| 96 | + { |
| 97 | + "ruleId": "AtLeastOneConstructor", |
| 98 | + "ruleIndex": 0, |
| 99 | + "message": { |
| 100 | + "text": "Each class should declare at least one constructor" |
| 101 | + }, |
| 102 | + "locations": [ |
| 103 | + { |
| 104 | + "physicalLocation": { |
| 105 | + "artifactLocation": { |
| 106 | + "uri": "testdata/repositories/pmd/RulesBreaker.java" |
| 107 | + }, |
| 108 | + "region": { |
| 109 | + "startLine": 15, |
| 110 | + "startColumn": 8, |
| 111 | + "endLine": 15, |
| 112 | + "endColumn": 13 |
| 113 | + } |
| 114 | + } |
| 115 | + } |
| 116 | + ] |
| 117 | + }, |
| 118 | + { |
| 119 | + "ruleId": "UnusedPrivateField", |
| 120 | + "ruleIndex": 1, |
| 121 | + "message": { |
| 122 | + "text": "Avoid unused private fields such as 'x'." |
| 123 | + }, |
| 124 | + "locations": [ |
| 125 | + { |
| 126 | + "physicalLocation": { |
| 127 | + "artifactLocation": { |
| 128 | + "uri": "testdata/repositories/pmd/RulesBreaker.java" |
| 129 | + }, |
| 130 | + "region": { |
| 131 | + "startLine": 18, |
| 132 | + "startColumn": 17, |
| 133 | + "endLine": 18, |
| 134 | + "endColumn": 18 |
| 135 | + } |
| 136 | + } |
| 137 | + } |
| 138 | + ] |
| 139 | + }, |
| 140 | + { |
| 141 | + "ruleId": "ShortVariable", |
| 142 | + "ruleIndex": 2, |
| 143 | + "message": { |
| 144 | + "text": "Avoid variables with short names like x" |
| 145 | + }, |
| 146 | + "locations": [ |
| 147 | + { |
| 148 | + "physicalLocation": { |
| 149 | + "artifactLocation": { |
| 150 | + "uri": "testdata/repositories/pmd/RulesBreaker.java" |
| 151 | + }, |
| 152 | + "region": { |
| 153 | + "startLine": 18, |
| 154 | + "startColumn": 17, |
| 155 | + "endLine": 18, |
| 156 | + "endColumn": 18 |
| 157 | + } |
| 158 | + } |
| 159 | + } |
| 160 | + ] |
| 161 | + }, |
| 162 | + { |
| 163 | + "ruleId": "CommentRequired", |
| 164 | + "ruleIndex": 3, |
| 165 | + "message": { |
| 166 | + "text": "Field comments are required" |
| 167 | + }, |
| 168 | + "locations": [ |
| 169 | + { |
| 170 | + "physicalLocation": { |
| 171 | + "artifactLocation": { |
| 172 | + "uri": "testdata/repositories/pmd/RulesBreaker.java" |
| 173 | + }, |
| 174 | + "region": { |
| 175 | + "startLine": 18, |
| 176 | + "startColumn": 17, |
| 177 | + "endLine": 18, |
| 178 | + "endColumn": 18 |
| 179 | + } |
| 180 | + } |
| 181 | + } |
| 182 | + ] |
| 183 | + } |
| 184 | + ], |
| 185 | + "invocations": [ |
| 186 | + { |
| 187 | + "executionSuccessful": false, |
| 188 | + "toolConfigurationNotifications": [ |
| 189 | + { |
| 190 | + "associatedRule": { |
| 191 | + "id": "LoosePackageCoupling" |
| 192 | + }, |
| 193 | + "message": { |
| 194 | + "text": "No packages or classes specified" |
| 195 | + } |
| 196 | + } |
| 197 | + ], |
| 198 | + "toolExecutionNotifications": [] |
| 199 | + } |
| 200 | + ] |
| 201 | + } |
| 202 | + ] |
| 203 | +} |
0 commit comments