Skip to content

Commit

Permalink
Add CUE linter
Browse files Browse the repository at this point in the history
  • Loading branch information
mhersson authored and mfussenegger committed Feb 20, 2024
1 parent 31be66c commit 3e51220
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ Other dedicated linters that are built-in are:
| [cpplint][cpplint] | `cpplint` |
| [credo][credo] | `credo` |
| [cspell][36] | `cspell` |
| [cue][cue] | `cue` |
| [curlylint][curlylint] | `curlylint` |
| [dash][dash] | `dash` |
| [deno][deno] | `deno` |
Expand Down Expand Up @@ -450,6 +451,7 @@ busted tests/
[janet]: https://github.com/janet-lang/janet
[bandit]: https://bandit.readthedocs.io/en/latest/
[bean-check]: https://beancount.github.io/docs/running_beancount_and_generating_reports.html#bean-check
[cue]: https://github.com/cue-lang/cue
[curlylint]: https://www.curlylint.org/
[sqlfluff]: https://github.com/sqlfluff/sqlfluff
[verilator]: https://verilator.org/guide/latest/
Expand Down
12 changes: 12 additions & 0 deletions lua/lint/linters/cue.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
local efm = "%E%m:,%C%f:%l:%c"

return {
cmd = "cue",
args = { "vet" },
stdin = false,
ignore_exitcode = true,
stream = "stderr",
parser = require("lint.parser").from_errorformat(efm, {
source = "cue vet",
}),
}

0 comments on commit 3e51220

Please sign in to comment.