diff --git a/README.md b/README.md index 28ef4506..78b21f2f 100644 --- a/README.md +++ b/README.md @@ -237,6 +237,7 @@ Other dedicated linters that are built-in are: | [tflint][tflint] | `tflint` | | [tfsec][tfsec] | `tfsec` | | [tlint][tlint] | `tlint` | +| [Tombi][tombi] | `tombi` | | [trivy][trivy] | `trivy` | | [ts-standard][ts-standard] | `ts-standard` | | [twig-cs-fixer][twig-cs-fixer] | `twig-cs-fixer` | @@ -665,3 +666,4 @@ vimcats -t -f lua/lint.lua lua/lint/parser.lua > doc/lint.txt [zlint]: https://donisaac.github.io/zlint/ [dclint]: https://github.com/zavoloklom/docker-compose-linter [detect-secrets]: https://github.com/Yelp/detect-secrets +[tombi]: https://github.com/tombi-toml/tombi diff --git a/lua/lint/linters/tombi.lua b/lua/lint/linters/tombi.lua new file mode 100644 index 00000000..837b6147 --- /dev/null +++ b/lua/lint/linters/tombi.lua @@ -0,0 +1,13 @@ +local efm = "%E Error: %m,%WWarning: %m,%C at %f:%l:%c" + +return { + cmd = "tombi", + args = { "lint" }, + stdin = false, + stream = "stdout", + ignore_exitcode = true, + env = { + ["NO_COLOR"] = "1", -- Any non-empty value disables colored output + }, + parser = require("lint.parser").from_errorformat(efm, { source = "tombi" }), +}