Single @Alert does not need curly brackets.
(final List<String> lines, final String relativePath)
| 498 | * Single @Alert does not need curly brackets. |
| 499 | */ |
| 500 | private void singleAlert(final List<String> lines, final String relativePath) { |
| 501 | int i = 0; |
| 502 | for (final String line : lines) { |
| 503 | if (line.trim().startsWith("@Alerts") && line.contains("@Alerts({") && line.contains("})")) { |
| 504 | final String alert = line.substring(line.indexOf('{'), line.indexOf('}')); |
| 505 | if (!alert.contains(",") && alert.contains("\"") |
| 506 | && alert.indexOf('"', alert.indexOf('"') + 1) != -1) { |
| 507 | addFailure(relativePath, i + 1, "No need for curly brackets"); |
| 508 | } |
| 509 | } |
| 510 | i++; |
| 511 | } |
| 512 | } |
| 513 | |
| 514 | /** |
| 515 | * Verifies that only static loggers exist. |
no test coverage detected