Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tamaroning/lunalint
Lua linter written in Rust
https://github.com/tamaroning/lunalint
Last synced: about 1 month ago
JSON representation
Lua linter written in Rust
- Host: GitHub
- URL: https://github.com/tamaroning/lunalint
- Owner: tamaroning
- License: other
- Created: 2024-08-16T16:28:42.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2024-08-25T03:42:38.000Z (5 months ago)
- Last Synced: 2024-08-25T11:44:42.169Z (5 months ago)
- Language: Rust
- Homepage:
- Size: 163 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# lunalint
lunalint is a linter for Lua scripts. It is designed to be fast and to emit user-friendly messages.
## Prerequisites
- Cargo and Rust## Build & Run
```sh
cargo run --release --
```## Example
```sh
$ cargo run --release -- examples/bad_code.lua
[999] Error: Count down loop which never reaches end (count-down-loop)
╭─[bad_code.lua:3:9]
│
3 │ for i = 10, 1 do
│ ──┬──
│ ╰──── Did you mean `10, 1, -1`?
│
│ Help: for further information visit https://luals.github.io/wiki/diagnostics/#count-down-loop
───╯
[999] Error: Invalid global (`_ENV` is `nil`) (global-in-nil-env)
╭─[bad_code.lua:1:1]
│
1 │ _ENV = nil
│ ──┬─
│ ╰─── Assignment occurs here
│
│ Help: for further information visit https://luals.github.io/wiki/diagnostics/#global-in-nil-env
───╯
[999] Error: Global variable `foo` starts with a lowercase letter (lowercase-global)
╭─[bad_code.lua:6:1]
│
6 │ foo = { i = 1 }
│ ─┬─
│ ╰─── Did you miss `local` or misspell it?
│
│ Help: for further information visit https://luals.github.io/wiki/diagnostics/#lowercase-global
───╯
lunalint: error: exited with 1 due to previous errors
```## License
MIT.
See [LICENSE](LICENSE).