Skip to content

Commit

Permalink
Update puppet-lint (#451)
Browse files Browse the repository at this point in the history
  • Loading branch information
misaflo authored Nov 8, 2023
1 parent 7746f95 commit 49916c6
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions lua/lint/linters/puppet-lint.lua
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
local errorformat = '%f:%l:%c:%tarning:%m, %f:%l:%c:%trror:%m'
local pattern = '(.+):(%d+):(%d+):(%l+):(.+):(.+)'
local groups = { 'file', 'lnum', 'col', 'severity', 'code', 'message' }

local severities = {
['error'] = vim.diagnostic.severity.ERROR,
['warning'] = vim.diagnostic.severity.WARN,
}

return {
cmd = 'puppet-lint',
stdin = false,
args = {
'--no-autoloader_layout-check',
'--log-format', '%{path}:%{line}:%{column}:%{kind}:[%{check}] %{message}'
'--log-format', '%{path}:%{line}:%{column}:%{kind}:%{check}:%{message}'
},
ignore_exitcode = true,
parser = require('lint.parser').from_errorformat(errorformat, {
source = 'puppet-lint',
})
parser = require('lint.parser').from_pattern(pattern, groups, severities, {
['source'] = 'puppet-lint',
}),
}

0 comments on commit 49916c6

Please sign in to comment.