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

Closed
valeneiko opened this issue May 3, 2024 · 0 comments · Fixed by #6899
Closed

oxc_language_server incorrectly resolves .gitignore patterns #3156

valeneiko opened this issue May 3, 2024 · 0 comments · Fixed by #6899
Labels
C-bug Category - Bug good first issue Experience Level - Good for newcomers

Comments

@valeneiko
Copy link
Contributor

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
@Boshen Boshen removed their assignment Aug 5, 2024
@Boshen Boshen added the good first issue Experience Level - Good for newcomers label Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category - Bug good first issue Experience Level - Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants