-
-
Notifications
You must be signed in to change notification settings - Fork 339
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
linter: panic in jest/expect-expect
#3323
Comments
Why does it need to check for the arguments when oxc/crates/oxc_linter/src/rules/jest/expect_expect.rs Lines 170 to 174 in 27030b9
Edit: it failed on this case
|
I found the current implementation was not correct. It finds assert function from fn run_once(&self, ctx: &LintContext) {
let test_functions = HashSet::new();
for node in ctx.nodes() {
if is_test_function(node) {
test_functions.insert(node.span());
} else if is_expect_call(node) {
// try get nearest test function, if got, remove it from test_functions
}
}
} |
Can we do a temporary fix first, and then figure out how to best write this? |
fix: #3324 I just replace `name` with a `set`, feel like this can catch more cases. And this rule needs to be [rewritten](#3323 (comment)).
Panic is resolved, and the below belongs to another issue.
|
Found in https://github.com/oxc-project/oxlint-ecosystem-ci/actions/runs/9123766396/job/25086817261?pr=6
Reduced case:
Infinite recursion in
oxc/crates/oxc_linter/src/rules/jest/expect_expect.rs
Lines 179 to 188 in 27030b9
because it went back inside
handler
The text was updated successfully, but these errors were encountered: