# Luacheck

Declare the globals Lua code may use

Set the target Lua runtime and allowed globals. Flag accidental global writes, unused variables and unreachable code as part of the normal test workflow.

Category: Code quality
Languages: Lua

## Standard evidence

Rubric v1 · 2/8 verified · 6 unknown · 0 contrary · reviewed 2026-11-28

- **Definition** (verified) — Under the configured global environment, assigning, mutating and reading an undefined global trigger distinct warnings. Reviewed 2026-11-28. [Source](https://luacheck.readthedocs.io/en/stable/warnings.html)
- **Measurement** (verified) — Luacheck reports warning 111, 112 or 113 for those operations. The warning code distinguishes the operation that violated the policy. Reviewed 2026-11-28. [Source](https://luacheck.readthedocs.io/en/stable/warnings.html)
- **Conformance** (unknown) — No reviewed evidence is recorded for this dimension.
- **CI enforcement** (unknown) — No reviewed evidence is recorded for this dimension.
- **Getting started** (unknown) — No reviewed evidence is recorded for this dimension.
- **Real-world adoption** (unknown) — No reviewed evidence is recorded for this dimension.
- **Agent guidance** (unknown) — No reviewed evidence is recorded for this dimension.
- **Agent portability** (unknown) — No reviewed evidence is recorded for this dimension.

## Adoption

Use Luacheck in this repository to meet this standard: Declare the globals Lua code may use. Set the target Lua runtime and allowed globals. Flag accidental global writes, unused variables and unreachable code as part of the normal test workflow. Inspect the repository configuration, record the baseline and exact reproduction steps, then add the smallest repeatable check that detects a regression.

### Tool command

```
luacheck .
```

Seikika package: no verified installation is listed.

## References

- [Tool documentation](https://luacheck.readthedocs.io/)
- [Agent skill](/skills/luacheck/SKILL.md)
