7

[PDK-997] Rubocop check passes in group, fails when solo - Puppet Tickets

 3 years ago
source link: https://tickets.puppetlabs.com/browse/PDK-997
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Rubocop check passes in group, fails when solo

Details

Description

When running the checks from .travis.yml at the CLI in a single lump, everything passes.

[rnelson0@build03 domain_join:pdk±]$ pdk bundle exec rake syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop
pdk (INFO): Using Ruby 2.4.4
pdk (INFO): Using Puppet 5.5.1
Running RuboCop...
Inspecting 0 files
0 files inspected, no offenses detected
---> syntax:manifests
---> syntax:templates
---> syntax:hiera:yaml 

When running one test at a time, each test passes except rubocop.

 [rnelson0@build03 domain_join:pdk±]$ for x in syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop
> do
> pdk bundle exec rake $x
> done
pdk (INFO): Using Ruby 2.4.4
pdk (INFO): Using Puppet 5.5.1---> syntax:manifests
---> syntax:templates
---> syntax:hiera:yaml
pdk (INFO): Using Ruby 2.4.4
pdk (INFO): Using Puppet 5.5.1
pdk (INFO): Using Ruby 2.4.4
pdk (INFO): Using Puppet 5.5.1
pdk (INFO): Using Ruby 2.4.4
pdk (INFO): Using Puppet 5.5.1
pdk (INFO): Using Ruby 2.4.4
pdk (INFO): Using Puppet 5.5.1
pdk (INFO): Using Ruby 2.4.4
pdk (INFO): Using Puppet 5.5.1
pdk (INFO): Using Ruby 2.4.4
pdk (INFO): Using Puppet 5.5.1
pdk (INFO): Using Ruby 2.4.4
pdk (INFO): Using Puppet 5.5.1
Running RuboCop...
Inspecting 5 files
CCC.COffenses:spec/spec_helper_acceptance.rb:17:27: C: Style/HashSyntax: Use the new Ruby 1.9 hash syntax. (https://github.com/bbatsov/ruby-style-guide#hash-literals)
    puppet_module_install(:source => proj_root, :module_name => 'domain_join')
                          ^^^^^^^^^^
...
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^5 files inspected, 41 offenses detected
RuboCop failed!

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK