https://github.com/mikz/codeclimate-luacheck
CodeClimate Engine running luacheck
https://github.com/mikz/codeclimate-luacheck
codeclimate-engine luacheck
Last synced: 9 months ago
JSON representation
CodeClimate Engine running luacheck
- Host: GitHub
- URL: https://github.com/mikz/codeclimate-luacheck
- Owner: mikz
- License: mit
- Created: 2017-03-23T10:18:16.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-06-13T09:44:22.000Z (over 7 years ago)
- Last Synced: 2025-04-01T02:51:55.978Z (10 months ago)
- Topics: codeclimate-engine, luacheck
- Language: Lua
- Size: 29.3 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Code Climate luacheck Engine [](https://travis-ci.org/mikz/codeclimate-luacheck)
CodeClimate Engine that runs [luacheck](https://github.com/mpeterv/luacheck/) on Lua files.
Uses [linguist](https://github.com/github/linguist) to detect Lua files.
## Engine
To enable the luacheck engine add the following to your `.codeclimate.yml` file:
```yml
engines:
luacheck:
enabled: true
ratings:
paths:
- "**.lua"
```
## Configuration
Luacheck engine supports plenty of configuration options.
### Checks
You can control which checks to enable/disable via [patterns](http://luacheck.readthedocs.io/en/stable/cli.html#patterns):
```yaml
engines:
luacheck:
enabled: true
checks:
631: # disable check 631
enabled: false
4.2: # disable shadowing declarations of arguments or redefining them
enabled: false
```
### Config
You can control global configuration options of luacheck:
```yaml
engines:
luacheck:
enabled: true
config:
allow_defined: # you can use both enabled: true/false and just true/false
enabled: true
allow_defined_top: false
module: false
compat: true
std: # which standard library to use, all are concatenated with +
- min
- busted
globals:
- val
read_globals:
- read
new_globals:
- new
new_read_globals:
- new
not_globals:
- new
ignore:
- new
enable:
- new
only: # only run global-related warnings
- 1
```
## Testing
```shell
make build test integration
```