-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
2,166 additions
and
1,990 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,63 @@ | ||
{"version":"3","listProblem":[]} | ||
{"version":"3","listProblem":[{ | ||
"tool": "Code Inspection", | ||
"category": "RegExp", | ||
"type": "Regular expression can be simplified", | ||
"tags": [ | ||
"RegExp" | ||
], | ||
"severity": "Moderate", | ||
"comment": "`[\\\\*]` can be simplified to '\\\\\\*'", | ||
"detailsInfo": "Reports regular expressions that can be simplified.\n\n**Example:**\n\n\n [a] xx* [ah-hz]\n\nAfter the quick-fix is applied:\n\n\n a x+ [ahz]\n\nNew in 2022.1", | ||
"sources": [ | ||
{ | ||
"type": "file", | ||
"path": "src/main/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/UsingHardcodeSecretInformationDiagnostic.java", | ||
"language": "JAVA", | ||
"line": 67, | ||
"offset": 75, | ||
"length": 5, | ||
"code": { | ||
"startLine": 65, | ||
"length": 5, | ||
"offset": 80, | ||
"surroundingCode": " );\n\n private static final Pattern PATTERN_CHECK_PASSWORD = Pattern.compile(\"^[\\\\*]+$\", Pattern.UNICODE_CASE);\n\n @DiagnosticParameter(" | ||
} | ||
} | ||
], | ||
"attributes": { | ||
"module": "bsl-language-server.main", | ||
"inspectionName": "RegExpSimplifiable" | ||
}, | ||
"hash": "a96a0536e198cbff96eebc4edc9806807b12725ac46694da2501ad5bce236c55" | ||
},{ | ||
"tool": "Code Inspection", | ||
"category": "Verbose or redundant code constructs", | ||
"type": "Unnecessary 'default' for enum 'switch' statement", | ||
"tags": [ | ||
"JAVA" | ||
], | ||
"severity": "High", | ||
"comment": "`default` branch is unnecessary", | ||
"detailsInfo": "Reports enum `switch` statements or expression with `default` branches which can never be taken, because all possible values are covered by a `case` branch.\n\nSuch elements are redundant, especially for `switch` expressions, because they don't compile when all\nenum constants are not covered by a `case` branch.\n\n\nThe language level needs to be configured to 14 to report `switch` expressions.\n\nThe provided quick-fix removes `default` branches.\n\nExample:\n\n\n enum E { A, B }\n int foo(E e) {\n return switch (e) {\n case A -> 1;\n case B -> 2;\n default -> 3;\n };\n }\n\nAfter the quick-fix is applied:\n\n\n enum E { A, B }\n int foo(E e) {\n return switch (e) {\n case A -> 1;\n case B -> 2;\n };\n }\n\nUse the **Only report switch expressions** option to report only redundant `default` branches in switch expressions.", | ||
"sources": [ | ||
{ | ||
"type": "file", | ||
"path": "src/main/java/com/github/_1c_syntax/bsl/languageserver/utils/expressiontree/DefaultNodeEqualityComparer.java", | ||
"language": "JAVA", | ||
"line": 51, | ||
"offset": 7, | ||
"length": 7, | ||
"code": { | ||
"startLine": 49, | ||
"length": 7, | ||
"offset": 136, | ||
"surroundingCode": " case SKIPPED_CALL_ARG -> true;\n case CALL -> callStatementsEqual((AbstractCallNode) first, (AbstractCallNode) second);\n default -> throw new IllegalStateException();\n };\n" | ||
} | ||
} | ||
], | ||
"attributes": { | ||
"module": "bsl-language-server.main", | ||
"inspectionName": "UnnecessaryDefault" | ||
}, | ||
"hash": "2c72370b59dde2cbf1ea29e8feac3da6f729b7114f1766f8f09a515ec88ac90f" | ||
}]} |
Oops, something went wrong.