Check user systemd unit files with systemd-analyze

This commit is contained in:
w0rp
2021-03-14 23:34:38 +00:00
parent b45ee8ec6c
commit f43e4abc88
7 changed files with 77 additions and 1 deletions

View File

@@ -0,0 +1,19 @@
Before:
runtime ale_linters/systemd/systemd_analyze.vim
After:
call ale#linter#Reset()
Execute(The systemd-analyze handler should parse lines correctly):
AssertEqual
\ [
\ {
\ 'lnum': 9,
\ 'col': 1,
\ 'type': 'W',
\ 'text': 'Unknown key name ''Wat'' in section ''Service'', ignoring.',
\ },
\ ],
\ ale_linters#systemd#systemd_analyze#Handle(bufnr(''), [
\ '/home/user/.config/systemd/user/foo.service:9: Unknown key name ''Wat'' in section ''Service'', ignoring.',
\ ])