vscode-lua icon indicating copy to clipboard operation
vscode-lua copied to clipboard

luacheck should be run on directories, not single files

Open gajop opened this issue 6 years ago • 1 comments

I'm running into an issue of there being a lot of false positives in VS Code because luacheck is run on a per-file basis, meaning that globals defined in other files are being missed (I don't use module=true). Luacheck produces 0 warnings otherwise (when run from the command line on directory trees).

I'm not sure what the best solution for this would be, but for now, I would like to make it possible to specify global=false when using the IDE. To generalize this, I'd like to have a vscode override for .luacheckrc, that takes precedence over the directory tree .luacheckrc files.

gajop avatar Dec 09 '18 10:12 gajop

I've added an option to pass additional arguments to luacheck, as well as an option to use a custom .luacheckrc file. Hopefully one of these options solves your issue.

I think running luacheck on a folder would be a much better option, but would require a fairly significant refactor, which I don't presently have the time to commit to.

trixnz avatar Dec 23 '18 23:12 trixnz