include it code for later resolvable autofixes

This commit is contained in:
WebFreak001 2023-07-09 00:55:56 +02:00
parent 340a5f59e7
commit 5494ce2b6e
No known key found for this signature in database
GPG Key ID: AEFC88D11109D1AA
2 changed files with 40 additions and 2 deletions

View File

@ -2,5 +2,11 @@ struct S
{
int myProp() @property
{
static if (a)
{
}
else if (b)
{
}
}
}

View File

@ -54,10 +54,42 @@
]
}
]
},
{
"autofixes": [
{
"name": "Insert `static`",
"replacements": [
{
"newText": "static ",
"range": [
69,
69
]
}
]
},
{
"name": "Wrap '{}' block around 'if'",
"replacements": "resolvable"
}
],
"lineOfCodeCount": 0,
"statementCount": 0,
"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": 3,
"statementCount": 4,
"structCount": 1,
"templateCount": 0,
"undocumentedPublicSymbols": 0