Skip to content
This repository was archived by the owner on Aug 16, 2025. It is now read-only.

Feat/luacheck #349

Merged
merged 4 commits into from
May 19, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ description: The latest updates and changes to CodeRabbit.
sidebar_position: 13
---

## May 19, 2025

### Lua Support with Luacheck

We're excited to announce enhanced support for Lua code analysis with [Luacheck](https://github.com/mpeterv/luacheck), a powerful static analyzer and linter for Lua code.

## April 19, 2025

### Docstring Path Instructions
Expand Down
2 changes: 2 additions & 0 deletions docs/tools/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ For an overview of how CodeRabbit uses these tools when generating code reviews,
| JSX | [Biome][Biome], [oxlint][oxlint] | Code Quality |
| Kotlin | [detekt][detekt] | Code Quality |
| Kubernetes | [Checkov][Checkov] | Code Security |
| Lua | [Luacheck][Luacheck] | Code Quality |
| Markdown | [markdownlint][markdownlint], [LanguageTool][LanguageTool] | Code Quality, Grammar Checking |
| PHP | [PHPStan][PHPStan] | Code Quality |
| Plaintext | [LanguageTool][LanguageTool] | Grammar and Spell Checking |
Expand Down Expand Up @@ -72,3 +73,4 @@ For an overview of how CodeRabbit uses these tools when generating code reviews,
[PrismaLint]: /tools/prisma-lint.md
[oxlint]: /tools/oxlint.md
[ShopifyCLI]: /tools/shopify-cli.md
[Luacheck]: /tools/luacheck.md
49 changes: 49 additions & 0 deletions docs/tools/luacheck.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
title: Luacheck
sidebar_label: Luacheck
description: CodeRabbit's guide to Luacheck.
---

```mdx-code-block
import ProPlanNotice from '@site/src/components/ProPlanNotice.mdx';

<ProPlanNotice />
```

[Luacheck](https://github.com/mpeterv/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`

:::note

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

## Links

- [Luacheck GitHub Repository](https://github.com/mpeterv/luacheck)
- [Luacheck Documentation](https://luacheck.readthedocs.io/)