diff --git a/tests/it/source_autofix.d b/tests/it/source_autofix.d index 98b43a8..170244c 100644 --- a/tests/it/source_autofix.d +++ b/tests/it/source_autofix.d @@ -2,5 +2,11 @@ struct S { int myProp() @property { + static if (a) + { + } + else if (b) + { + } } } diff --git a/tests/it/source_autofix.report.json b/tests/it/source_autofix.report.json index eadc653..f1ff0b9 100644 --- a/tests/it/source_autofix.report.json +++ b/tests/it/source_autofix.report.json @@ -54,10 +54,42 @@ ] } ] + }, + { + "autofixes": [ + { + "name": "Insert `static`", + "replacements": [ + { + "newText": "static ", + "range": [ + 69, + 69 + ] + } + ] + }, + { + "name": "Wrap '{}' block around 'if'", + "replacements": "resolvable" + } + ], + "column": 3, + "endColumn": 10, + "endIndex": 71, + "endLine": 8, + "fileName": "it/source_autofix.d", + "index": 64, + "key": "dscanner.suspicious.static_if_else", + "line": 8, + "message": "Mismatched static if. Use 'else static if' here.", + "name": "static_if_else_check", + "supplemental": [], + "type": "warn" } ], - "lineOfCodeCount": 0, - "statementCount": 0, + "lineOfCodeCount": 3, + "statementCount": 4, "structCount": 1, "templateCount": 0, "undocumentedPublicSymbols": 0