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.Documentation Index
Fetch the complete documentation index at: https://docs.coderabbit.ai/llms.txt
Use this file to discover all available pages before exploring further.
Supported Files
Luacheck will run on files with the following extensions:.lua
Configuration
Luacheck supports the following configuration files:.luacheckrcluacheckrc.luacheckrc.lualuacheckrc.lua
Luacheck does not require configuration to run. If no configuration file is found, it will use default settings.
When we skip LuaCheck
CodeRabbit will skip running LuaCheck when:- LuaCheck is already running in GitHub workflows.
Ignored rules
The following LuaCheck rules are automatically ignored:W113- accessing undefined variableW611- line too longW112- line contains only whitespaceW631- line that ends with whitespace
Profile behavior
In Chill mode, LuaCheck only reports errors (not warnings). In Assertive mode, LuaCheck reports both errors and warnings.Features
Luacheck can detect:- Usage of undefined global variables
- Unused variables and values
- Accessing uninitialized variables
- Unreachable code
- And many more issues