From 9ba067db8d8fc730736561ae5c7799dcc1140208 Mon Sep 17 00:00:00 2001 From: alex Date: Mon, 19 May 2025 16:11:54 -0400 Subject: [PATCH 1/4] adding luacheck --- docs/tools/list.md | 2 ++ docs/tools/luacheck.md | 49 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 docs/tools/luacheck.md diff --git a/docs/tools/list.md b/docs/tools/list.md index 65f9d12d..d85b4c78 100644 --- a/docs/tools/list.md +++ b/docs/tools/list.md @@ -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 | @@ -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 diff --git a/docs/tools/luacheck.md b/docs/tools/luacheck.md new file mode 100644 index 00000000..3a8414b6 --- /dev/null +++ b/docs/tools/luacheck.md @@ -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'; + + +``` + +[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/) From 9dd9a63723cbe612b7d68dd819f13e95b5643f76 Mon Sep 17 00:00:00 2001 From: alex Date: Mon, 19 May 2025 16:14:09 -0400 Subject: [PATCH 2/4] update changelog --- docs/changelog.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/changelog.md b/docs/changelog.md index 24e903ff..e9ed8b1e 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -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 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 From d9f012e5ff6fc1231cc219c26151eecefb8a095f Mon Sep 17 00:00:00 2001 From: alex Date: Mon, 19 May 2025 16:15:09 -0400 Subject: [PATCH 3/4] enhanced --- docs/changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/changelog.md b/docs/changelog.md index e9ed8b1e..9fe3847d 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -9,7 +9,7 @@ sidebar_position: 13 ### Lua Support with Luacheck -We're excited to announce support for Lua code analysis with [Luacheck](https://github.com/mpeterv/luacheck), a powerful static analyzer and linter for Lua code. +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 From ff5e3b70c6ceacbb00cee4673e160ef2f6ad29b7 Mon Sep 17 00:00:00 2001 From: alex Date: Mon, 19 May 2025 16:23:58 -0400 Subject: [PATCH 4/4] add sidebar --- sidebars.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/sidebars.ts b/sidebars.ts index 801435c8..c61517d4 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -158,6 +158,7 @@ const sidebars: SidebarsConfig = { "tools/golangci-lint", "tools/hadolint", "tools/languagetool", + "tools/luacheck", "tools/markdownlint", "tools/oxlint", "tools/phpstan",