ArcanistPuppetLinter broken with modern versions of puppet-lint, uses obsolete log-format key


#1

Observed Behavior:
arc lint on Puppet manifests is broken with modern versions of puppet-lint that do not support the %{linenumber} log-format key. Running arc lint with puppet-lint >= 2.1.0 produces:

 Exception 
Some linters failed:
    - CommandException: Command failed with error #1!
      COMMAND
      'puppet-lint' '--error-level=all' '--log-format=%{linenumber}|%{column}|%{kind}|%{check}|%{message}' '/some/path/puppet/manifests/site.pp'
      
      STDOUT
      (empty)
      
      STDERR
      /usr/lib/ruby/vendor_ruby/puppet-lint.rb:119:in `%': key{linenumber} not found (KeyError)
      	from /usr/lib/ruby/vendor_ruby/puppet-lint.rb:119:in `format_message'
      	from /usr/lib/ruby/vendor_ruby/puppet-lint.rb:166:in `block in report'
      	from /usr/lib/ruby/vendor_ruby/puppet-lint.rb:156:in `each'
      	from /usr/lib/ruby/vendor_ruby/puppet-lint.rb:156:in `report'
      	from /usr/lib/ruby/vendor_ruby/puppet-lint.rb:215:in `print_problems'
      	from /usr/lib/ruby/vendor_ruby/puppet-lint/bin.rb:67:in `block in run'
      	from /usr/lib/ruby/vendor_ruby/puppet-lint/bin.rb:62:in `each'
      	from /usr/lib/ruby/vendor_ruby/puppet-lint/bin.rb:62:in `run'
      	from /usr/bin/puppet-lint:7:in `<main>'
      
(Run with `--trace` for a full exception trace.)

Expected Behavior:
arc lint should work normally without raising an exception.

Phabricator Version:
This is an arcanist bug, reproducible as of
25c2381959ac94d9249ae4023c5f9ea36436b81c

Reproduction Steps:
Run arc lint on a puppet repository with modified files and at least one error/warning using puppet-lint >= 2.1.0.

Notes:
%{linenumber} had been deprecated since 2014[1] in favor of %{line} and was eventually removed in puppet-lint 2.1.0[2]. I guess switching over to %{line} should work for everyone these days.

[1] https://github.com/rodjek/puppet-lint/commitdd77ecaab12dc516c45ca620212e0f45b6b5a628
[2] https://github.com/rodjek/puppet-lint/commit870cc9577b1dd58c3453402880cbf9fd5900fc31


#2

Broadly, see https://secure.phabricator.com/T10038.