Skip to content

Commit

Permalink
Add customizable variable for arguments to yamllint (#4)
Browse files Browse the repository at this point in the history
This allows to launch yamllint through some other program that requires
additional arguments, such as Podman or Make, or adding e.g. the "--strict"
argument to yamllint.
  • Loading branch information
bkhl committed Feb 26, 2023
1 parent f269e66 commit 020d2a3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion flymake-yamllint.el
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@
"Name of `yamllint' executable."
:type 'string)

(defcustom flymake-yamllint-arguments
nil
"A list of strings to pass to the yamllint program as arguments."
:type '(repeat (string :tag "Argument")))

(defvar-local flymake-yamllint--proc nil)

(defun flymake-yamllint (report-fn &rest _args)
Expand All @@ -73,7 +78,7 @@
(make-process
:name "flymake-yamllint" :noquery t :connection-type 'pipe
:buffer (generate-new-buffer " *flymake-yamllint*")
:command (list flymake-yamllint--executable-path "-" "-f" "parsable")
:command `(,flymake-yamllint--executable-path ,@flymake-yamllint-arguments "-f" "parsable" "-")
:sentinel
(lambda (proc _event)
(when (eq 'exit (process-status proc))
Expand Down

0 comments on commit 020d2a3

Please sign in to comment.