Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Static Analysis & Code Quality
  3. luacheck

luacheck

MITLuav1.2.0

A static analyzer and linter for Lua code that detects undefined globals, unused variables, and other issues.

Visit WebsiteGitHubGitHub
444 stars60 forks0 contributors

What is luacheck?

Luacheck is a static analyzer and linter for Lua that detects a wide range of coding issues, such as undefined global variables, unused variables and values, uninitialized variable access, and unreachable code. It aims to improve Lua code quality through configurable static analysis, supporting Lua versions 5.1 through 5.4 and LuaJIT. The tool is designed to be flexible and lightweight, with options for customization via command line, configuration files, or inline comments.

Target Audience

Lua developers and teams working on projects across multiple Lua versions (5.1-5.4 and LuaJIT) who need to enforce code quality and catch common errors early in development. It is particularly useful for those integrating linting into editors or CI/CD pipelines.

Value Proposition

Developers choose Luacheck for its broad Lua version compatibility, high configurability for project-specific needs, and extensive editor integration. Its ability to perform parallel checking with LuaLanes offers performance advantages for large codebases.

Overview

A tool for linting and static analysis of Lua code.

Use Cases

Best For

  • Enforcing code quality standards in Lua projects across multiple Lua versions (5.1-5.4 and LuaJIT).
  • Detecting undefined global variables in Lua code to prevent runtime errors.
  • Identifying unused variables and values to clean up code and reduce bugs.
  • Integrating static analysis into editors like Vim, Sublime Text, Atom, Emacs, VS Code, and others for real-time feedback.
  • Running linting as part of CI/CD workflows using Docker or GitHub Actions.
  • Configuring project-specific linting rules via custom globals and warning filters.

Not Ideal For

  • Projects requiring runtime error detection or dynamic code analysis
  • Teams exclusively using a single, modern Lua version without cross-version needs
  • Environments where minimal dependencies are critical, due to optional LuaLanes for parallel checking
  • Codebases with heavy metaprogramming or dynamic features that static analysis struggles to cover

Pros & Cons

Pros

Broad Lua Version Support

Supports Lua 5.1 through 5.4 and LuaJIT, making it versatile for projects targeting diverse Lua environments, as explicitly stated in the overview.

Highly Configurable Linting

Options to define custom globals, filter warnings, and configure via command line, config files, or inline comments allow fine-tuned code quality checks tailored to project needs.

Extensive Editor Integration

Plugins available for Vim, Sublime Text, Atom, Emacs, VS Code, and others provide real-time inline warnings, enhancing developer workflow as detailed in the related projects section.

Parallel Checking Performance

Optional support for LuaLanes enables faster analysis of large codebases, improving efficiency where performance is a concern, though it requires an additional dependency.

Cons

Static Analysis Limitations

Cannot detect runtime errors or issues in dynamically generated code, limiting its effectiveness for Lua patterns that rely on execution-time behavior.

Dependency Overhead for Features

Parallel checking requires separate installation of LuaLanes, adding complexity and potential setup hurdles, as noted in the installation instructions.

Evolving Module Interface

The README warns that the luacheck module interface may change between minor releases, which could break custom integrations or require maintenance efforts.

Frequently Asked Questions

Quick Stats

Stars444
Forks60
Contributors0
Open Issues33
Last commit1 month ago
CreatedSince 2019

Tags

#linter#luajit#cli-tool#luarocks#code-quality#development-tools#lua#linting#static-analysis

Built With

S
Sphinx
L
LuaFileSystem
L
LuaRocks
b
busted
l
luasocket
D
Docker
L
Lua

Links & Resources

Website

Included in

Static Analysis & Code Quality14.5k
Auto-fetched 1 day ago

Related Projects

PHP ParserPHP Parser

A PHP parser written in PHP

Stars17,431
Forks1,121
Last commit2 months ago
TypeScript ESLintTypeScript ESLint

:sparkles: Monorepo for all the tooling which enables ESLint to support TypeScript

Stars16,250
Forks2,901
Last commit2 days ago
pyrightpyright

Static Type Checker for Python

Stars15,449
Forks1,785
Last commit2 days ago
ReviewdogReviewdog

🐶 Automated code review tool integrated with any code analysis tools regardless of programming language

Stars9,315
Forks487
Last commit1 day ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub