paulczar / meez

rubygem to set up opinionated TDD chef cookbook
73 stars 17 forks source link

New cookbook created from meez, 30 offenses detected #26

Open flaccid opened 10 years ago

flaccid commented 10 years ago
$ chef exec rake test
chef exec foodcritic .

chef exec rubocop
Inspecting 11 files
.CCC.....CC

Offenses:

Guardfile:5:9: C: Use %r only for regular expressions matching more than 1 '/' character.
  watch(%r{.+\.rb$})
        ^^^^^^^^^^^
Guardfile:6:9: C: Use %r only for regular expressions matching more than 1 '/' character.
  watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) }
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Guardfile:10:9: C: Use %r only for regular expressions matching more than 1 '/' character.
  watch(%r{attributes/.+\.rb$})
        ^^^^^^^^^^^^^^^^^^^^^^
Guardfile:11:9: C: Use %r only for regular expressions matching more than 1 '/' character.
  watch(%r{providers/.+\.rb$})
        ^^^^^^^^^^^^^^^^^^^^^
Guardfile:12:9: C: Use %r only for regular expressions matching more than 1 '/' character.
  watch(%r{recipes/.+\.rb$})
        ^^^^^^^^^^^^^^^^^^^
Guardfile:13:9: C: Use %r only for regular expressions matching more than 1 '/' character.
  watch(%r{resources/.+\.rb$})
        ^^^^^^^^^^^^^^^^^^^^^
Guardfile:14:9: C: Use %r only for regular expressions matching more than 1 '/' character.
  watch(%r{metadata\.rb$})
        ^^^^^^^^^^^^^^^^^
Guardfile:15:4: C: Final newline missing.
end

metadata.rb:2:5: C: Put one space between the method name and the first argument.
name             'roundcube'
    ^^^^^^^^^^^^^
metadata.rb:3:11: C: Put one space between the method name and the first argument.
maintainer       'Chris Fordham'
          ^^^^^^^
metadata.rb:5:8: C: Put one space between the method name and the first argument.
license          'Apache 2.0'
       ^^^^^^^^^^
metadata.rb:6:12: C: Put one space between the method name and the first argument.
description      'Installs/Configures roundcube'
           ^^^^^^
metadata.rb:8:8: C: Put one space between the method name and the first argument.
version          '0.1.0'
       ^^^^^^^^^^
Rakefile:11:10: C: %-literals should be delimited by ( and )
      sh %{wget -O /tmp/meez_chefdk.deb https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chefdk_0.2.1-1_amd64.deb}
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Rakefile:11:135: C: Line is too long. [135/80]
      sh %{wget -O /tmp/meez_chefdk.deb https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chefdk_0.2.1-1_amd64.deb}
                                                                                                                                      ^
Rakefile:12:10: C: %-literals should be delimited by ( and )
      sh %{sudo dpkg -i /tmp/meez_chefdk.deb}
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Rakefile:18:10: C: %-literals should be delimited by ( and )
      sh %{chef exec bundle install --path=.bundle --jobs 1 --retry 3 --verbose}
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Rakefile:20:10: C: %-literals should be delimited by ( and )
      sh %{chef exec bundle install --path .bundle}
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Rakefile:25:8: C: %-literals should be delimited by ( and )
    sh %{chef exec berks install}
       ^^^^^^^^^^^^^^^^^^^^^^^^^^
Rakefile:35:8: C: %-literals should be delimited by ( and )
    sh %{chef exec rubocop}
       ^^^^^^^^^^^^^^^^^^^^
Rakefile:39:8: C: %-literals should be delimited by ( and )
    sh %{chef exec foodcritic .}
       ^^^^^^^^^^^^^^^^^^^^^^^^^
Rakefile:48:8: C: %-literals should be delimited by ( and )
    sh %{chef exec kitchen test}
       ^^^^^^^^^^^^^^^^^^^^^^^^^
Rakefile:56:8: C: %-literals should be delimited by ( and )
    sh %{chef exec rspec test/unit/spec}
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Rakefile:70:33: C: Space inside square brackets detected.
task default: ['prepare', 'test' ]
                                ^
Rakefile:72:1: C: Extra blank line detected.
Rakefile:73:1: C: Extra blank line detected.
Rakefile:78:8: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
  puts ">>>>> Kitchen gem not loaded, omitting tasks" unless ENV['CI']
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Thorfile:11:8: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
  puts ">>>>> Kitchen gem not loaded, omitting tasks" unless ENV['CI']
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Vagrantfile:7:93: C: Line is too long. [133/80]
  config.vm.box_url = "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_#{config.vm.box}_chef-provisionerless.box"
                                                                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Vagrantfile:16:9: C: Use 2 spaces for indentation in an array, relative to the start of the line where the left bracket is.
        'recipe[roundcube::default]'
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

11 files inspected, 30 offenses detected
rake aborted!
Command failed with status (1): [chef exec rubocop...]
/Users/chris.fordham/src/github/xhost-cookbooks/roundcube/Rakefile:35:in `block (2 levels) in <top (required)>'
Tasks: TOP => test => style => style:rubocop
(See full trace by running task with --trace)

On latest OS X (10.10.1) so ruby 2.0.0p481. Would these be considered bugs which we can look at fixing in meez?

flaccid commented 9 years ago

It looks like a lot of these are actually upstream with the tools that generate. For the ones in meez that are templates, I have tried to fix most via https://github.com/paulczar/meez/pull/29.