Uploaded image for project: 'Puppet Development Kit (moved to puppet.atlassian.net)'
  1. Puppet Development Kit (moved to puppet.atlassian.net)
  2. PDK-997

Rubocop check passes in group, fails when solo

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • None
    • PDK 1.9.0
    • None
    • Using PDK 1.5.0.0 from RPM on CentOS 7, pointed at the template-ref "heads/master-0-g7b5f6d2"

    • Needs Assessment
    • Bug Fix
    • The `check:test_files` Rake task from puppetlabs_spec_helper has been rewritten so that it no longer interferes with any tasks that might run after it in the same Rake command (e.g. `rake test:test_files rubocop`).
    • Needs Assessment

    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!

      Attachments

        Activity

          People

            tim.sharpe Tim Sharpe
            rnelson0@gmail.com Rob Nelson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support