Skip to content

Commit

Permalink
feat(hadolint): add Dockerfile to filetypes
Browse files Browse the repository at this point in the history
ekalinin/Dockerfile.vim uses Dockerfile as a filetype, causing hadolint
not to be activated when editing Dockerfile files. nvim-lspconfig also
uses both filetypes for activating dockerls, so I think it makes sense
to have them both for hadolint too until this is eventually changed in
Dockerfile.vim. (see linked issue)

See:
https://github.com/neovim/nvim-lspconfig/blob/cd1ccf0/lua/lspconfig/dockerls.lua#L10
ekalinin/Dockerfile.vim#67
  • Loading branch information
strayer committed Oct 21, 2021
1 parent d5aeb72 commit 7852d82
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/BUILTINS.md
Original file line number Diff line number Diff line change
Expand Up @@ -1363,7 +1363,7 @@ local sources = { null_ls.builtins.diagnostics.hadolint }

##### Defaults

- `filetypes = { "dockerfile" }`
- `filetypes = { "Dockerfile", "dockerfile" }`
- `command = "hadolint"`
- `args = { "--no-fail", "--format=json", "$FILENAME" }`

Expand Down
2 changes: 1 addition & 1 deletion lua/null-ls/builtins/diagnostics.lua
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ M.eslint_d = h.make_builtin({

M.hadolint = h.make_builtin({
method = DIAGNOSTICS,
filetypes = { "dockerfile" },
filetypes = { "Dockerfile", "dockerfile" },
generator_opts = {
command = "hadolint",
format = "json",
Expand Down

0 comments on commit 7852d82

Please sign in to comment.