How to make vscode-luacheck work with the luacheck.exe

luacheck is quite useful

If you’ve installed luacheck as a .exe and you need vscode-luacheck to work you’re currently going to need to implement a workaround. This appears to be a common issue I’ve seen with people using vscode and luacheck.

If the error you’re seeing is “Please install luacheck or check luacheck.path” you’re seeing, this tutorial is here to help!

Failure to find the folder even if you have luacheck added to the PATH variable

Basically, the extension is looking for a luacheck.bat file! You can fix this by just creating a luacheck.bat file that forwards arguments to the folder

The file I’m using is simply this:

@echo off
luacheck.exe %*
Put the .bat file right in with the luacheck executable

I put it right next to the path with the luacheck.exe. This results in linting on my files!

Hopefully the extension creators will fix this soon!

Didn’t work? Or don’t have things installed? Here’s the assumptions made:

If you haven’t installed luacheck yet, we’re assuming the following is true:

The version of luacheck for VSCode that I’m using
  • You’re on Windows, using VSCode
  • You’ve installed the VSCode extension vscode-luacheck by dwengear
  • You’ve downloaded the luacheck.exe from the latest release and put in a folder on your path
  • You can execute luacheck on PowerShell and it finds the .exe (You may have to add luacheck to your path. Checkout the section in this tutorial about adding rojo to your path)

If you need this extension to work on Linux or Mac, you’re going to need to install luacheck the more traditional way, and not by copying the luacheck.exe.

Thanks for reading! I hope this article helps you out! Let me know if you have any questions!

Roblox Development

The stories, commentaries, and thoughts on game development.

Roblox Development

The stories, commentaries, and thoughts on game development. Capturing the experience.

James Onnen (Quenty)

Written by

I’m a maker. Designing and creating new things with people is my hobby. Former intern @Microsoft, @Roblox, @Garmin. Roblox Toy. Raikes 2019.

Roblox Development

The stories, commentaries, and thoughts on game development. Capturing the experience.