diff --git a/README.md b/README.md index c07c6e61..9bacb587 100644 --- a/README.md +++ b/README.md @@ -200,6 +200,7 @@ Other dedicated linters that are built-in are: | [statix check][33] | `statix` | | [stylelint][29] | `stylelint` | | [SwiftLint][swiftlint] | `swiftlint` | +| [systemd-analyze][systemd-analyze] | `systemd-analyze` | | [systemdlint][systemdlint] | `systemdlint` | | [tflint][tflint] | `tflint` | | [tfsec][tfsec] | `tfsec` | @@ -543,3 +544,4 @@ busted tests/ [eugene]: https://github.com/kaaveland/eugene [clippy]: https://github.com/rust-lang/rust-clippy [hledger]: https://hledger.org/ +[systemd-analyze]: https://man.archlinux.org/man/systemd-analyze.1 diff --git a/lua/lint/linters/systemd-analyze.lua b/lua/lint/linters/systemd-analyze.lua new file mode 100644 index 00000000..ff0beafc --- /dev/null +++ b/lua/lint/linters/systemd-analyze.lua @@ -0,0 +1,11 @@ +return { + cmd = "systemd-analyze", + args = {"verify"}, + ignore_exitcode = true, + stdin = false, + stream = "stderr", + parser = require("lint.parser").from_errorformat("%f:%l:%m", { + source = "systemd", + severity = vim.diagnostic.severity.WARN + }) +}