Skip to content

Commit

Permalink
Remove formatting with linenumber
Browse files Browse the repository at this point in the history
`linenumber` has been deprecated since v1.0.0, which was released in
Aug 2014. It is time to remove it.

Fixes GH-539

Signed-off-by: Romanos Skiadas <rom.skiad@gmail.com>
  • Loading branch information
rski committed Aug 22, 2016
1 parent 9bf6d30 commit 870cc95
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 15 deletions.
1 change: 0 additions & 1 deletion lib/puppet-lint.rb
Expand Up @@ -131,7 +131,6 @@ def report(problems)
next if message[:kind] == :ignored && !PuppetLint.configuration.show_ignored

message[:KIND] = message[:kind].to_s.upcase
message[:linenumber] = message[:line]

if message[:kind] == :fixed || [message[:kind], :all].include?(configuration.error_level)
format_message message
Expand Down
3 changes: 0 additions & 3 deletions lib/puppet-lint/optparser.rb
Expand Up @@ -83,9 +83,6 @@ def self.build
'%{check} - The name of the check.',
'%{message} - The message.'
) do |format|
if format.include?('%{linenumber}')
$stderr.puts "DEPRECATION: Please use %{line} instead of %{linenumber}"
end
PuppetLint.configuration.log_format = format
end

Expand Down
11 changes: 0 additions & 11 deletions spec/puppet-lint/bin_spec.rb
Expand Up @@ -213,17 +213,6 @@ def initialize(args)
}
end

context 'to print %{linenumber}' do
let(:args) { [
'--log-format', '%{linenumber}',
'spec/fixtures/test/manifests/fail.pp'
] }

its(:exitstatus) { is_expected.to eq(1) }
its(:stdout) { is_expected.to eq('2') }
its(:stderr) { is_expected.to eq('DEPRECATION: Please use %{line} instead of %{linenumber}') }
end

context 'to print %{line}' do
let(:args) { [
'--log-format', '%{line}',
Expand Down

0 comments on commit 870cc95

Please sign in to comment.