Skip to content

Commit

Permalink
Add systemd-analyze linter
Browse files Browse the repository at this point in the history
  • Loading branch information
mfussenegger committed Aug 16, 2024
1 parent 683693d commit e9b481a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` |
Expand Down Expand Up @@ -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
11 changes: 11 additions & 0 deletions lua/lint/linters/systemd-analyze.lua
Original file line number Diff line number Diff line change
@@ -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
})
}

0 comments on commit e9b481a

Please sign in to comment.