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

Add Cane #333

Merged
merged 5 commits into from Feb 9, 2013
Merged

Add Cane #333

merged 5 commits into from Feb 9, 2013

Conversation

justincampbell
Copy link
Contributor

  • Can be invoked with cane or thor spec quality
  • Settings are in .cane
  • Currently allowing violations for our current codebase
  • Will fail the build if quality or coverage gets any worse

@justincampbell
Copy link
Contributor Author

Current violations, for funsies:

Methods exceeded maximum allowed ABC complexity (18):

  lib/berkshelf/installer.rb                    Berkshelf::Installer#install                                  35
  lib/berkshelf/berksfile.rb                    Berkshelf::Berksfile#sources                                  32
  lib/berkshelf/command.rb                      Berkshelf::Command#filter                                     28
  lib/berkshelf/locations/chef_api_location.rb  Berkshelf::ChefAPILocation#initialize                         27
  lib/berkshelf/installer.rb                    Berkshelf::Installer#vendor                                   27
  lib/berkshelf/cli.rb                          Berkshelf::Cli#upload                                         26
  lib/berkshelf/cookbook_source.rb              Berkshelf::CookbookSource#initialize                          22
  lib/berkshelf/vagrant/action/upload.rb        Berkshelf::Vagrant::Action::Upload#upload                     20
  lib/berkshelf/resolver.rb                     Berkshelf::Resolver#use_source                                19
  lib/berkshelf/berksfile.rb                    Berkshelf::Berksfile#upload                                   19
  lib/berkshelf/cli.rb                          Berkshelf::Cli#configure                                      18
  lib/berkshelf/vagrant.rb                      Berkshelf::Vagrant#init!                                      17
  lib/berkshelf/berksfile.rb                    Berkshelf::Berksfile#metadata                                 17
  lib/berkshelf/vagrant/config.rb               Berkshelf::Vagrant::Config#validate                           17
  lib/berkshelf/vagrant/action/install.rb       Berkshelf::Vagrant::Action::Install#configure_cookbooks_path  16
  lib/berkshelf/berksfile.rb                    Berkshelf::Berksfile#outdated                                 16
  lib/berkshelf/cli.rb                          Berkshelf::Cli#outdated                                       16
  lib/berkshelf/cookbook_generator.rb           Berkshelf::CookbookGenerator#generate                         16

Class definitions require explanatory comments on preceding line (6):

  lib/berkshelf/core_ext/file.rb:1                    File
  lib/berkshelf/core_ext/pathname.rb:1                Pathname
  lib/berkshelf/core_ext/string.rb:1                  String
  lib/berkshelf/lockfile.rb:2                         Lockfile
  lib/thor/monkies/hash_with_indifferent_access.rb:1  Thor
  lib/thor/monkies/hash_with_indifferent_access.rb:3  HashWithIndifferentAccess

Total Violations: 24

--doc-exclude lib/berkshelf/errors.rb
--gte coverage/.last_run.json,93
--max-violations 24
--no-style
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This excludes "line over 80 character" warnings

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been following 120 character limits pretty much. Do you want to set it to that and check for it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@reset Done. There are a few over, but I also updated the max-violations to match.

@sethvargo
Copy link
Contributor

#awkard... I wrote most of those methods.

@justincampbell
Copy link
Contributor Author

@sethvargo Ha! No finger pointing here, just trying to get better at this stuff :p

@sethvargo
Copy link
Contributor

👍

@reset
Copy link
Contributor

reset commented Feb 7, 2013

I'd like to merge this once we've got the build passing for it's current failures. After merging this we will have all new potential reasons for our build to fail and I'd like to keep the problem surface smaller for now ;)

@justincampbell
Copy link
Contributor Author

Sounds good to me. We can shelve it for a bit.

-Justin

On Wednesday, February 6, 2013 at 8:44 PM, Jamie Winsor wrote:

I'd like to merge this once we've got the build passing for it's current failures. After merging this we will have all new potential reasons for our build to fail and I'd like to keep the problem surface smaller for now ;)


Reply to this email directly or view it on GitHub (#333 (comment)).

@sethvargo
Copy link
Contributor

sherf* it for a bit 😄

* Can be invoked with `cane` or `thor spec quality`
* Settings are in ./.cane
* Currently allowing violations for our current codebase
* Will fail the build if quality or coverage gets any worse
@justincampbell
Copy link
Contributor Author

@reset This is ready for review again, rebased off of master

reset added a commit that referenced this pull request Feb 9, 2013
@reset reset merged commit 078ebdd into master Feb 9, 2013
@reset reset deleted the cane branch February 9, 2013 06:16
@berkshelf berkshelf locked and limited conversation to collaborators Jun 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants