Skip to content

language_server: crashed with custom config path + ignorePatterns #10941

@Sysix

Description

@Sysix

What version of Oxlint are you using?

latest

What command did you run?

No response

What does your .oxlintrc.json config file look like?

{
  "categories": {
    "correctness": "error",
    "perf": "error"
  },
  "ignorePatterns": [
    "**/fixtures"
  ]
}

https://github.com/oxc-project/oxc/blob/main/editors/vscode/.oxlintrc.json

What happened?

Defining in VSCode settings.json a custom config Path like:

{
  "oxc.configPath": "./editors/vscode/.oxlintrc.json"
}

will crash the server:

thread 'main' panicked at /home/sysix/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ignore-0.4.23/src/gitignore.rs:229:9:
path is expected to be under the root
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Using the config Path without ./ will not crash the serer:

{
  "oxc.configPath": "editors/vscode/.oxlintrc.json"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions