1234567891011121314 |
- {
- "id": 944,
- "key": "S1125",
- "language": "java",
- "name": "Boolean expressions should not be compared to true or false",
- "description": "<p> Boolean expressions should not be compared against boolean literals, as their value can be directly used. </p> <p>The following code:</p> <pre> if (booleanVariable == true) { /* ... */ } // Non-Compliant if (booleanVariable != true) { /* ... */ } // Non-Compliant </pre> <p>should be refactored into:</p> <pre> if (booleanVariable) { /* ... */ } // Compliant if (!booleanVariable) { /* ... */ } // Compliant </pre>",
- "parentKey": null,
- "repositoryKey": "squid",
- "severity": "MAJOR",
- "status": "READY",
- "cardinality": "SINGLE",
- "createdAt": "2013-07-26T07:40:51.977Z",
- "updatedAt": "2014-01-10T15:38:27.386Z"
- }
|