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

class_inherits_from_params_class throws exception in 0.3.0 #150

Closed
dcarley opened this issue Sep 25, 2012 · 1 comment
Closed

class_inherits_from_params_class throws exception in 0.3.0 #150

dcarley opened this issue Sep 25, 2012 · 1 comment

Comments

@dcarley
Copy link
Contributor

dcarley commented Sep 25, 2012

The following simple class:

# Class: foo::bar
#
# blah blah
#
class foo::bar inherits foo {}

Raises this error with 0.3.0:

dan@dan-MBP ~/projects/vagrant/civitas/puppet $ puppet-lint test.pp 
/home/dan/projects/vagrant/civitas/puppet/vendor/gems/puppet-lint-0.3.0/bin/../lib/puppet-lint/plugins/check_classes.rb:76:in `lint_check_class_inherits_from_params_class': undefined method `value' for nil:NilClass (NoMethodError)
        from /home/dan/projects/vagrant/civitas/puppet/vendor/gems/puppet-lint-0.3.0/bin/../lib/puppet-lint/plugins/check_classes.rb:71:in `each'
        from /home/dan/projects/vagrant/civitas/puppet/vendor/gems/puppet-lint-0.3.0/bin/../lib/puppet-lint/plugins/check_classes.rb:71:in `lint_check_class_inherits_from_params_class'
        from /home/dan/projects/vagrant/civitas/puppet/vendor/gems/puppet-lint-0.3.0/bin/../lib/puppet-lint/plugin.rb:49:in `send'
        from /home/dan/projects/vagrant/civitas/puppet/vendor/gems/puppet-lint-0.3.0/bin/../lib/puppet-lint/plugin.rb:49:in `run'
        from /home/dan/projects/vagrant/civitas/puppet/vendor/gems/puppet-lint-0.3.0/bin/../lib/puppet-lint/plugin.rb:47:in `each'
        from /home/dan/projects/vagrant/civitas/puppet/vendor/gems/puppet-lint-0.3.0/bin/../lib/puppet-lint/plugin.rb:47:in `run'
        from /home/dan/projects/vagrant/civitas/puppet/vendor/gems/puppet-lint-0.3.0/bin/../lib/puppet-lint.rb:155:in `run'
        from /home/dan/projects/vagrant/civitas/puppet/vendor/gems/puppet-lint-0.3.0/bin/../lib/puppet-lint/bin.rb:106:in `run'
        from /home/dan/projects/vagrant/civitas/puppet/vendor/gems/puppet-lint-0.3.0/bin/../lib/puppet-lint/bin.rb:103:in `each'
        from /home/dan/projects/vagrant/civitas/puppet/vendor/gems/puppet-lint-0.3.0/bin/../lib/puppet-lint/bin.rb:103:in `run'
        from /home/dan/projects/vagrant/civitas/puppet/vendor/gems/puppet-lint-0.3.0/bin/puppet-lint:7
        from /home/dan/projects/vagrant/civitas/puppet/vendor/bin/puppet-lint:19:in `load'
        from /home/dan/projects/vagrant/civitas/puppet/vendor/bin/puppet-lint:19

Some different combinations of comments at the top of the class file prevent this from happening.

vStone added a commit to vStone/puppet-lint that referenced this issue Sep 26, 2012
@rodjek rodjek closed this as completed in 886f05b Sep 26, 2012
rodjek pushed a commit that referenced this issue Sep 26, 2012
…arams_class_exception

Fixes #150 class inherits from params class exception
@dcarley
Copy link
Contributor Author

dcarley commented Sep 27, 2012

Thanks guys!

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

2 participants