Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scarb lint --fix does not fix all of the diagnostics #214

Open
MKowalski8 opened this issue Mar 10, 2025 · 0 comments
Open

scarb lint --fix does not fix all of the diagnostics #214

MKowalski8 opened this issue Mar 10, 2025 · 0 comments

Comments

@MKowalski8
Copy link
Contributor

Problem

Despite correct diagnostics, when two errors of the same category occur in the same module, scarb lint --fix only fixes one of them.

Steps

  1. Create a module with code below
fn fun() {
    let foo: Option<i32> = Option::None;
    // This is just a variable.
    let _foo = match foo {
        Option::Some(v) => Result::Ok(v),
        Option::None => Result::Err('this is an err'),
    };
}

fn fun2() {
    let foo: Option<i32> = Option::None;
    // This is just a variable.
    let _foo = match foo {
        Option::Some(v) => Result::Ok(v),
        Option::None => Result::Err(Error::Error),
    };
}
  1. Run scarb lint --fix
  2. It fixes only one of the function, but detect both of them

Scarb Version

2.11.0

Possible Solution(s)

No response

Notes

No response

@MKowalski8 MKowalski8 changed the title scarb lint --fix does not fix all of the errors scarb lint --fix does not fix all of the diagnostics Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

1 participant