Skip to content

Commit

Permalink
Add ksh linter
Browse files Browse the repository at this point in the history
  • Loading branch information
eestrada committed Sep 20, 2024
1 parent cae364f commit b178f85
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 @@ -147,6 +147,7 @@ Other dedicated linters that are built-in are:
| [joker][joker] | `joker` |
| [jshint][jshint] | `jshint` |
| [jsonlint][jsonlint] | `jsonlint` |
| [ksh][ksh] | `ksh` |
| [ktlint][ktlint] | `ktlint` |
| [lacheck][lacheck] | `lacheck` |
| [Languagetool][5] | `languagetool` |
Expand Down Expand Up @@ -485,6 +486,7 @@ busted tests/
[cmakelint]: https://github.com/cmake-lint/cmake-lint
[rstcheck]: https://github.com/myint/rstcheck
[rstlint]: https://github.com/twolfson/restructuredtext-lint
[ksh]: https://github.com/ksh93/ksh
[ktlint]: https://github.com/pinterest/ktlint
[php]: https://www.php.net/
[phpcs]: https://github.com/squizlabs/PHP_CodeSniffer
Expand Down
12 changes: 12 additions & 0 deletions lua/lint/linters/ksh.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
return {
cmd = "ksh",
stdin = true,
append_fname = false,
args = { "-o", "noexec", "-s" },
stream = "stderr",
ignore_exitcode = true,
parser = require("lint.parser").from_errorformat(
"ksh:\\ syntax\\ %t%.%#\\ at\\ line\\ %l:\\ %m,ksh:\\ %t%.%#\\ line\\ %l:\\ %m",
{ source = "ksh" }
),
}

0 comments on commit b178f85

Please sign in to comment.