Luacheck is a static analyzer and linter for Lua code that detects various issues such as undefined global variables, unused variables and values, accessing uninitialized variables, unreachable code, and more.

Supported Files

Luacheck will run on files with the following extensions:
  • .lua

Configuration

Luacheck supports the following configuration files:
  • .luacheckrc
  • luacheckrc
  • .luacheckrc.lua
  • luacheckrc.lua
Luacheck does not require configuration to run. If no configuration file is found, it will use default settings.

Features

Luacheck can detect:
  • Usage of undefined global variables
  • Unused variables and values
  • Accessing uninitialized variables
  • Unreachable code
  • And many more issues