include it code for later resolvable autofixes
This commit is contained in:
parent
340a5f59e7
commit
5494ce2b6e
|
|
@ -2,5 +2,11 @@ struct S
|
||||||
{
|
{
|
||||||
int myProp() @property
|
int myProp() @property
|
||||||
{
|
{
|
||||||
|
static if (a)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
else if (b)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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,
|
"lineOfCodeCount": 3,
|
||||||
"statementCount": 0,
|
"statementCount": 4,
|
||||||
"structCount": 1,
|
"structCount": 1,
|
||||||
"templateCount": 0,
|
"templateCount": 0,
|
||||||
"undocumentedPublicSymbols": 0
|
"undocumentedPublicSymbols": 0
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue