Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove formatting with linenumber #539

Closed
rski opened this issue Aug 22, 2016 · 8 comments
Closed

Remove formatting with linenumber #539

rski opened this issue Aug 22, 2016 · 8 comments
Milestone

Comments

@rski
Copy link
Contributor

rski commented Aug 22, 2016

As pointed out here, formatting the output with linenumber has been deprecated since two years ago and line has been available since v1.0.0.
It might be time to remove linenumber.

rski added a commit to rski/puppet-lint that referenced this issue Aug 22, 2016
`linenumber` has been deprecated since v1.0.0, which was released in
Aug 2014. It is time to remove it.

Fixes rodjekGH-539

Signed-off-by: Romanos Skiadas <rom.skiad@gmail.com>
@rnelson0
Copy link
Collaborator

I'm down with that. I'm not sure if that's acceptable for 2.1.0, since it was marked deprecated in 1.x, or if we should wait for 3.0.0. Either way, I think we should wait for flycheck to receive its fix, first. @rski please keep us apprised of that effort, and in the meantime we can discuss how quickly we can deprecate it.

@rski
Copy link
Contributor Author

rski commented Aug 23, 2016

Ah, the joys of semver .
2.0.0 would've been a good time to remove this, but I only just ran into it. I can leave this open and rebase once 3.0.0 is to be released.

@rnelson0
Copy link
Collaborator

Heh, indeed. I do think we will have a 3.x soonish regardless, as p3/Ruby 1.8.7 support disappears, so I will tag this appropriately.

@rnelson0 rnelson0 added this to the 3.0.0 milestone Aug 23, 2016
rski added a commit to rski/flycheck that referenced this issue Aug 23, 2016
Puppet-lint has deprecated formatting with `linenumber` in favour of
`line`. It has been deprecated since v1.0.0 in 2014 and will be removed
in v3.0.0: rodjek/puppet-lint#539

Closes flycheckGH-1050

Signed-off-by: Romanos Skiadas <rom.skiad@gmail.com>
rski added a commit to rski/flycheck that referenced this issue Aug 23, 2016
Puppet-lint has deprecated formatting with `linenumber` in favour of
`line`. It has been deprecated since v1.0.0 in 2014 and will be removed
in v3.0.0. See rodjek/puppet-lint#539

Closes flycheckGH-1050

Signed-off-by: Romanos Skiadas <rom.skiad@gmail.com>
rski added a commit to rski/flycheck that referenced this issue Aug 23, 2016
Puppet-lint has deprecated formatting with `linenumber` in favour of
`line`. It has been deprecated since v1.0.0 in 2014 and will be removed
in v3.0.0. See rodjek/puppet-lint#539

Closes flycheckGH-1050
cpitclaudel pushed a commit to flycheck/flycheck that referenced this issue Aug 25, 2016
Puppet-lint has deprecated formatting with `linenumber` in favour of
`line`. It has been deprecated since v1.0.0 in 2014 and will be removed
in v3.0.0. See rodjek/puppet-lint#539

Closes GH-1050
traylenator added a commit to traylenator/modulesync_config that referenced this issue Oct 11, 2016
Fixes where you can run into  the error below.

The puppet-lint deprecation

http://github.com/rodjek/puppet-lint/pull/540

has been merged into master.

According to

rodjek/puppet-lint#539

it was meant to be added at version 3 but is now merged
with 2.0.2.

Thanks @Feandil for diagnosis.

```
rake aborted!
KeyError: key{linenumber} not found
/afs/cern.ch/user/s/straylen/.gem/ruby/bundler/gems/puppet-lint-32e93d43a3bf/lib/puppet-lint.rb:102:in
`%'
/afs/cern.ch/user/s/straylen/.gem/ruby/bundler/gems/puppet-lint-32e93d43a3bf/lib/puppet-lint.rb:102:in
`format_message'
/afs/cern.ch/user/s/straylen/.gem/ruby/bundler/gems/puppet-lint-32e93d43a3bf/lib/puppet-lint.rb:136:in
`block in report'
```
@cdenneen
Copy link

@rnelson0 I think there is something still using this. If this was tagged as for 3.x why is it merged in 2.x?

Using puppet-lint 2.0.2 from https://github.com/rodjek/puppet-lint.git (at master@b02628a)
Installing puppet-lint-absolute_classname-check 0.2.4
Installing puppet-lint-empty_string-check 0.2.2
Installing puppet-lint-leading_zero-check 0.1.1
Installing puppet-lint-roles_and_profiles-check 0.1.1
Installing puppet-lint-undef_in_function-check 0.2.1
Installing puppet-lint-unquoted_string-check 0.3.0
Installing puppet-lint-variable_contains_upcase 1.0.2
Installing puppet 4.3.2


+ echo Running Lint Testing
Running Lint Testing
+ bundle exec rake lint
rake aborted!
KeyError: key{linenumber} not found
/home/jenkins-slave/workspace/infra-controltemplate-validate/.bundle/ruby/2.1.0/bundler/gems/puppet-lint-b02628af003d/lib/puppet-lint.rb:102:in `%'
/home/jenkins-slave/workspace/infra-controltemplate-validate/.bundle/ruby/2.1.0/bundler/gems/puppet-lint-b02628af003d/lib/puppet-lint.rb:102:in `format_message'
/home/jenkins-slave/workspace/infra-controltemplate-validate/.bundle/ruby/2.1.0/bundler/gems/puppet-lint-b02628af003d/lib/puppet-lint.rb:136:in `block in report'
/home/jenkins-slave/workspace/infra-controltemplate-validate/.bundle/ruby/2.1.0/bundler/gems/puppet-lint-b02628af003d/lib/puppet-lint.rb:130:in `each'
/home/jenkins-slave/workspace/infra-controltemplate-validate/.bundle/ruby/2.1.0/bundler/gems/puppet-lint-b02628af003d/lib/puppet-lint.rb:130:in `report'
/home/jenkins-slave/workspace/infra-controltemplate-validate/.bundle/ruby/2.1.0/bundler/gems/puppet-lint-b02628af003d/lib/puppet-lint.rb:183:in `print_problems'
/home/jenkins-slave/workspace/infra-controltemplate-validate/.bundle/ruby/2.1.0/bundler/gems/puppet-lint-b02628af003d/lib/puppet-lint/tasks/puppet-lint.rb:80:in `block (3 levels) in define'
/home/jenkins-slave/workspace/infra-controltemplate-validate/.bundle/ruby/2.1.0/bundler/gems/puppet-lint-b02628af003d/lib/puppet-lint/tasks/puppet-lint.rb:77:in `each'
/home/jenkins-slave/workspace/infra-controltemplate-validate/.bundle/ruby/2.1.0/bundler/gems/puppet-lint-b02628af003d/lib/puppet-lint/tasks/puppet-lint.rb:77:in `block (2 levels) in define'
/home/jenkins-slave/workspace/infra-controltemplate-validate/.bundle/ruby/2.1.0/bundler/gems/puppet-lint-b02628af003d/lib/puppet-lint/tasks/puppet-lint.rb:71:in `block in define'
/home/jenkins-slave/workspace/infra-controltemplate-validate/.bundle/ruby/2.1.0/gems/rake-11.3.0/exe/rake:27:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.1.8/gems/bundler-1.13.0/lib/bundler/cli/exec.rb:74:in `load'
/usr/local/rvm/gems/ruby-2.1.8/gems/bundler-1.13.0/lib/bundler/cli/exec.rb:74:in `kernel_load'
/usr/local/rvm/gems/ruby-2.1.8/gems/bundler-1.13.0/lib/bundler/cli/exec.rb:27:in `run'
/usr/local/rvm/gems/ruby-2.1.8/gems/bundler-1.13.0/lib/bundler/cli.rb:332:in `exec'
/usr/local/rvm/gems/ruby-2.1.8/gems/bundler-1.13.0/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/rvm/gems/ruby-2.1.8/gems/bundler-1.13.0/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/usr/local/rvm/gems/ruby-2.1.8/gems/bundler-1.13.0/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
/usr/local/rvm/gems/ruby-2.1.8/gems/bundler-1.13.0/lib/bundler/cli.rb:20:in `dispatch'
/usr/local/rvm/gems/ruby-2.1.8/gems/bundler-1.13.0/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
/usr/local/rvm/gems/ruby-2.1.8/gems/bundler-1.13.0/lib/bundler/cli.rb:11:in `start'
/usr/local/rvm/gems/ruby-2.1.8/gems/bundler-1.13.0/exe/bundle:34:in `block in <top (required)>'
/usr/local/rvm/gems/ruby-2.1.8/gems/bundler-1.13.0/lib/bundler/friendly_errors.rb:100:in `with_friendly_errors'
/usr/local/rvm/gems/ruby-2.1.8/gems/bundler-1.13.0/exe/bundle:26:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.1.8/bin/bundle:23:in `load'
/usr/local/rvm/gems/ruby-2.1.8/bin/bundle:23:in `<main>'
/usr/local/rvm/gems/ruby-2.1.8/bin/ruby_executable_hooks:15:in `eval'
/usr/local/rvm/gems/ruby-2.1.8/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => lint
(See full trace by running task with --trace)
Build step 'Execute shell' marked build as failure

@rski
Copy link
Contributor Author

rski commented Nov 14, 2016

@cdenneen It's not released with 2.x though, master is ahead of 2.x and 3.x could be cut from it any time.

Using puppet-lint 2.0.2 from https://github.com/rodjek/puppet-lint.git (at master@b02628a)

This seems misleading because puppet-lint 2.0.2 was released at 9bf6d30 and b02628a is the current tip of master.

@cdenneen
Copy link

@rski you are correct, i read the 2.0.2 and missed the master,... but then something in puppet-lint master is still using linenumber even with this merged, correct?

@rski
Copy link
Contributor Author

rski commented Nov 14, 2016

yup. You can probably track it down and fix it quite easily :-). Until then pinning puppet-lint to 2.0.2 should work.

@rnelson0
Copy link
Collaborator

I am guessing it is a plugin using it. Regardless, you should either not point to github and use gem versions, or point to github/HEAD and accept that breakage may happen as you'll be using some unreleased code. We appreciate those testing against HEAD but certainly recommend you be able to drop to a pinned version in a hurry when the breakage starts to affect you.

Sliim added a commit to Sliim/puppet-pyenv that referenced this issue Jan 26, 2017
xalimar added a commit to xalimar/Kotty666-maxscale that referenced this issue Dec 13, 2017
It looks like puppet lint removed linenumber in favor of line
rodjek/puppet-lint#539

Modify the rake task and fix lint issues in config.pp
Rovanion added a commit to Rovanion/puppet-lint that referenced this issue Feb 8, 2019
It's use has apparently been deprecated for a while and was finally removed in August 2016: rodjek#539
spuder pushed a commit to spuder/puppet-consul that referenced this issue Feb 25, 2020
zajdee pushed a commit to zajdee/arcanist that referenced this issue Apr 1, 2020
This diff updates ArcanistPuppetLintLinter.php to be compatible with the latest `puppet-lint`.

Based on the change made by the `puppet-lint` maintainers in Issue rodjek/puppet-lint#539 and commithttps://github.com/rodjek/puppet-lint/pull/540 the `linenumber` format string is no longer supported.

While the issue was already reported in https://secure.phabricator.com/T10038 and https://secure.phabricator.com/T12169 it has never been fixed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants