fnando / vscode-linter

Extension for code linting, all in one package. New linters can be easily added through an extension framework.

Home Page:https://marketplace.visualstudio.com/items?itemName=fnando.linter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

v0.0.14 and Later Breaks Linting on MacOS

harjup opened this issue · comments

When using the linter plugin on 0.0.13, I get the following output

[1/13/2023, 11:56:00 AM] {
  "rootDir": "/Users/My.User/projects/my_root_path",
  "configFile": "",
  "command": [
    "/absolute/path/to/linting_script.rb",
    "--",
    "--format",
    "json",
    "--extra-details",
    "/absolute/path/to/target_file.rb",
  ]
}
[1/13/2023, 11:56:01 AM] rubocop's command took 1528ms

After which, linting errors correctly populate in my IDE.

But when I upgrade to 0.0.14 or later, get the following error:

Searched for any of /absolute/path/to/linting_script.rb; couldn't be found within $PATH: [
  "/opt/homebrew/bin",
  // ...
  "/usr/local/share/dotnet",
  "~/.dotnet/tools"
]
rubocop's command took 0ms

My guess is that one of windows compatibility fixes caused an issue for Unix systems.

By the looks of your log output, seems like you're running a custom lint script. Is that right? Maybe the issue is with custom scripts like yours, rather than macOS breakage all around (macOS is OS I use, and I can attest it's working).

Do you mind posting your config for this linting and the lint script itself (it doesn't have to be complete, but it should reproduce the error)?