Kampfkarren / selene

A blazing-fast modern Lua linter written in Rust
https://kampfkarren.github.io/selene/
Mozilla Public License 2.0
600 stars 76 forks source link

VS Code extension lints files outside of workspace root. #587

Open alterae opened 7 months ago

alterae commented 7 months ago

Expected Behavior

Selene's VS Code extension should only lint files present in the workspace root. IE: given a workspace with the root ~/code/factorio/chunk-power the extension should only lint files under that directory.

Actual Behavior

The extension lints workspace files, but also lints files such as ~/.vscode/extensions/sumneko.lua-3.7.4-darwin-arm64/server/meta/Lua 5.2 en-us utf8/basic.lua and ~/Library/Application Support/Steam/steamapps/common/Factorio/factorio.app/Contents/data/base/scenarios/freeplay/freeplay.lua when other extensions use those files to aid static analysis.

chriscerie commented 6 months ago

To clarify, is this what's happening?

  1. Open ~/code/factorio/chunk-power in vscode
  2. Open an external file like ~/Library/**/*.lua
  3. External file gets linted
alterae commented 6 months ago

no, external files are getting linted without me directly opening them (tho the files it lints seem to be ones the lua LSP is aware of/using for type-checking