Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions format-all.el
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
;; - Perl (perltidy)
;; - PHP (prettier plugin)
;; - Protocol Buffers (clang-format)
;; - Puppet (puppet-lint)
;; - PureScript (purty, purs-tidy)
;; - Python (black, yapf, isort)
;; - R (styler)
Expand Down Expand Up @@ -174,6 +175,7 @@
("Perl" perltidy)
("PHP" prettier)
("Protocol Buffer" clang-format)
("Puppet" puppet-lint)
("PureScript" purty)
("Python" black)
("R" styler)
Expand Down Expand Up @@ -1199,6 +1201,12 @@ Consult the existing formatters for examples of BODY."
(:features)
(:format (format-all--buffer-easy executable "format")))

(define-format-all-formatter puppet-lint
(:executable "puppet-lint-wrapper")
(:install "gem install --global puppet-lint")
(:languages "Puppet")
(:format (format-all--buffer-easy executable)))

(define-format-all-formatter purty
(:executable "purty")
(:install "npm install --global purty")
Expand Down
7 changes: 7 additions & 0 deletions puppet-lint-wrapper
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#! /bin/sh

t=$(mktemp)
cat >$t
puppet-lint --fix $t | egrep -v "^(FIXED|WARNING|ERROR):"
cat $t
rm -f $t