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 the diagnostics #450

Open
MKowalski8 opened this issue Mar 10, 2025 · 1 comment
Open

scarb lint --fix does not fix all the diagnostics #450

MKowalski8 opened this issue Mar 10, 2025 · 1 comment

Comments

@MKowalski8
Copy link

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

Possible Solution(s)

No response

Notes

No response

Scarb Version

2.11.0
@mkaput
Copy link
Member

mkaput commented Mar 10, 2025

duplicates software-mansion/cairo-lint#214?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants