Add Fix::applicability to JSON output (#4341)

This commit is contained in:
Micha Reiser 2023-05-10 16:34:53 +02:00 committed by GitHub
parent 04097d194c
commit ddbe5a1243
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 4 deletions

View file

@ -189,14 +189,13 @@ def fibonacci(n):
let fib_source = SourceFileBuilder::new("fib.py", fib).finish();
#[allow(deprecated)]
let unused_variable = Diagnostic::new(
UnusedVariable {
name: "x".to_string(),
},
TextRange::new(TextSize::from(94), TextSize::from(95)),
)
.with_fix(Fix::unspecified(Edit::deletion(
.with_fix(Fix::suggested(Edit::deletion(
TextSize::from(94),
TextSize::from(99),
)));