diff --git a/apps/oxlint/fixtures/issue_7566/.oxlintignore b/apps/oxlint/fixtures/issue_7566/.oxlintignore new file mode 100644 index 00000000000000..d3745c177fda76 --- /dev/null +++ b/apps/oxlint/fixtures/issue_7566/.oxlintignore @@ -0,0 +1 @@ +tests/** diff --git a/apps/oxlint/fixtures/issue_7566/tests/function/main.js b/apps/oxlint/fixtures/issue_7566/tests/function/main.js new file mode 100644 index 00000000000000..755b6d44fab2d1 --- /dev/null +++ b/apps/oxlint/fixtures/issue_7566/tests/function/main.js @@ -0,0 +1 @@ +123 == NaN; diff --git a/apps/oxlint/fixtures/issue_7566/tests/main.js b/apps/oxlint/fixtures/issue_7566/tests/main.js new file mode 100644 index 00000000000000..755b6d44fab2d1 --- /dev/null +++ b/apps/oxlint/fixtures/issue_7566/tests/main.js @@ -0,0 +1 @@ +123 == NaN; diff --git a/apps/oxlint/src/lint.rs b/apps/oxlint/src/lint.rs index 16e1b1e91aa716..6f3067719be630 100644 --- a/apps/oxlint/src/lint.rs +++ b/apps/oxlint/src/lint.rs @@ -777,4 +777,19 @@ mod test { ]); assert_eq!(result.number_of_files, 1); } + + // Issue: + #[test] + fn ignore_path_with_absolute_file() { + let args = &[ + "--ignore-path", + "fixtures/issue_7566/.oxlintignore", + "fixtures/issue_7566/tests/main.js", + "fixtures/issue_7566/tests/function/main.js", + ]; + let result = test(args); + assert_eq!(result.number_of_files, 0); + assert_eq!(result.number_of_warnings, 0); + assert_eq!(result.number_of_errors, 0); + } }