Luacheck

What Luacheck is
Luacheck is a static analyzer and linter for Lua code. It flags issues such as undefined globals, unused variables or values, uninitialized variables, and unreachable code. It checks Lua 5.1–5.4 and LuaJIT syntax, and runs on those Lua versions. Teams can tailor checks with command-line options, configuration files, or comments in the files being checked. Settings include project-specific globals, standard-global sets, warning filters, and per-file or per-path overrides. Command-line output options include TAP, JUnit XML, Visual Studio/MSBuild, plain text, and the default formatter. The project documents installation with LuaRocks and offers a single-file 64-bit Windows binary; it can also run in a standalone Docker container. GitHub Actions support and integrations for editors including Vim, Emacs, Visual Studio Code, and Geany are listed. Parallel checking requires LuaLanes. Luacheck is free and distributed under the MIT License. Its command-line interface is described as fairly stable, while the module interface may change between minor releases.
Who it suits
Luacheck suits Lua developers who want configurable static checks in command-line, editor, or CI workflows. It supports Lua 5.1–5.4 and LuaJIT syntax.
What it does well
- Checks Lua 5.1–5.4 and LuaJIT syntax.
- Configuration supports per-file and per-path overrides.
- Offers TAP, JUnit XML, and other output formats.
- GitHub Actions workflow and action are provided.
- Free and distributed under the MIT License.
What to know first
- Parallel checking requires the LuaLanes dependency.
- The module interface may change between minor releases.
Plans
| Plan | Billed and limits | Price |
|---|---|---|
| Luacheck | MIT-licensed Lua linter and static analyzer | Free |
As luacheck.readthedocs.io lists them, read 4 Oct 2026. The maker's own page has the final word.
Getting started
- Visit the Luacheck documentation website.
- Install it through LuaRocks, use the documented 64-bit Windows binary, or run its Docker container.
- Set project checks with command-line options, a configuration file, or comments in checked files.
- Add it to a GitHub Actions workflow or use a listed editor integration.
- Select a command-line output format such as TAP or JUnit XML if needed.
Verdict
Luacheck provides configurable checks for Lua code, with several output formats and documented CI and editor integrations. Its command-line interface is fairly stable, but the module interface may change between minor releases.
Questions
Does Luacheck cost anything?
Luacheck is free and open source under the MIT License.
Which Lua versions does it support?
It checks Lua 5.1 through 5.4 and LuaJIT syntax, and runs on those Lua versions.
How can I install Luacheck?
The project documents installation through LuaRocks and provides a single-file 64-bit Windows binary. It can also run as a standalone Docker container.
Does it integrate with GitHub Actions?
Yes. The project documents a GitHub Actions workflow and provides a Luacheck GitHub Action.
Which editors have listed integrations?
The project lists Vim, Sublime Text, Atom, Emacs, Brackets, Visual Studio Code, Nova, and Geany.
Is parallel checking included?
Parallel checking requires the LuaLanes dependency.
Facts from Luacheck's own pages
- CI integration
- The project documents a GitHub Actions workflow and provides a Luacheck GitHub Action. · github.com, 4 Oct 2026
- Configuration
- Checks can be configured through command-line options, configuration files, or comments in checked files. · github.com, 4 Oct 2026
- Configuration detail
- Configuration supports project-specific globals, standard-global sets, warning filters, and per-file or per-path overrides. · luacheck.readthedocs.io, 4 Oct 2026
- Container
- Luacheck can be run as a standalone Docker container, including a prebuilt image published through GitHub Container Registry. · github.com, 4 Oct 2026
- Editor integrations
- The project lists integrations for Vim, Sublime Text, Atom, Emacs, Brackets, Visual Studio Code, Nova, and Geany. · github.com, 4 Oct 2026
- Installation
- The project documents installation through LuaRocks and provides a single-file 64-bit Windows binary. · github.com, 4 Oct 2026
- License
- The project is distributed under the MIT License. · github.com, 4 Oct 2026
- Lua support
- It checks Lua 5.1–5.4 and LuaJIT syntax, and runs on those Lua versions. · github.com, 4 Oct 2026
- Output
- The command line supports built-in TAP, JUnit XML, Visual Studio/MSBuild, plain-text, and default formatters. · luacheck.readthedocs.io, 4 Oct 2026
- Parallel checks
- Parallel checking requires the LuaLanes dependency. · github.com, 4 Oct 2026
- Purpose
- Luacheck is a static analyzer and linter for Lua code. · github.com, 4 Oct 2026
- Stability note
- The README says the module interface may change between minor releases while the command-line interface is fairly stable. · github.com, 4 Oct 2026
- Support
- The project directs users to its GitHub issue tracker for bugs, suggestions, and questions, and says pull requests are welcome. · github.com, 4 Oct 2026
- Warnings
- It detects issues including undefined globals, unused variables and values, uninitialized variables, and unreachable code. · github.com, 4 Oct 2026
Where Luacheck stands on Freedom251
- Linters#13 of 33