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

oxc_language_server incorrectly resolves .gitignore patterns #3156

Open
valeneiko opened this issue May 3, 2024 · 0 comments
Open

oxc_language_server incorrectly resolves .gitignore patterns #3156

valeneiko opened this issue May 3, 2024 · 0 comments
Assignees
Labels
C-bug Category - Bug

Comments

@valeneiko
Copy link

If a repo has multiple .gitignore files, oxc_language_server will apply all patterns as if both file were in the root of the repo.

Imagine the following project structure:

/repo
  /projectA
    .gitignore
  /projectB
    index.ts
  .gitignore
# /repo/projectA/.gitignore
*
!.gitignore
# /repo/.gitignore
node_modules

When I save /repo/projectB/index.ts OXC VSCode extension does nothing, and I can see the following in the logs:

[2024-05-03T15:56:57Z DEBUG oxc_language_server] oxc server did save
[2024-05-03T15:56:57Z DEBUG oxc_language_server] ignored: file:///repo/projectB/index.ts

If I delete /repo/projectA/.gitignore, then VSCode extension correctly runs lint on that file.

@valeneiko valeneiko added the C-bug Category - Bug label May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category - Bug
Projects
None yet
Development

No branches or pull requests

2 participants