camptocamp / puppet-lint-roles_and_profiles-check

9 stars 8 forks source link

Not seeing expected behavior #1

Open rnelson0 opened 9 years ago

rnelson0 commented 9 years ago

I believe I installed the gem bundle properly:

[rnelson0@build puppet-lint-roles_and_profiles-check]$ bundle install
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
Installing rake 10.3.2
Installing diff-lcs 1.2.5
Using puppet-lint 1.1.0
Using puppet-lint-roles_and_profiles-check 0.1.0 from source at .
Installing rspec-support 3.1.2
Installing rspec-core 3.1.7
Installing rspec-expectations 3.1.2
Installing rspec-mocks 3.1.3
Installing rspec 3.1.0
Installing rspec-collection_matchers 1.0.0
Installing rspec-its 1.0.1
Using bundler 1.7.4
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
[rnelson0@build puppet-lint-roles_and_profiles-check]$ bundle show puppet-lint-roles_and_profiles-check
/home/rnelson0/git/puppet-lint-roles_and_profiles-check

I created a simple node entry and tested it with:

[rnelson0@build puppet-lint-roles_and_profiles-check]$ puppet-lint -l lib/puppet-lint/plugins/check_roles_and_profiles.rb ~/test.pp

The file contents varied but with these contents I receive no error:

node 'blah' {
  include roles::blah
  include roles::blah2
  include profile::something
  include profile::somethingelse
}

If I unquote the node name, puppet-lint complains, so linting is successful to some extent.

I would expect puppet-lint to now throw an error because there are multiple roles for a single node. Perhaps I misunderstand how the plugin works, did not install it, or did not invoke it correctly. Thanks for reviewing.

cdenneen commented 8 years ago

@rnelson0 can you create a PR for puppet-lint v2?

rnelson0 commented 8 years ago

Done in #5