Skip to content

Feat/luacheck #349

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 19, 2025
Merged
Show file tree
Hide file tree
Changes from all 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/)
1 change: 1 addition & 0 deletions sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ const sidebars: SidebarsConfig = {
"tools/golangci-lint",
"tools/hadolint",
"tools/languagetool",
"tools/luacheck",
"tools/markdownlint",
"tools/oxlint",
"tools/phpstan",
Expand Down