From 9c98f7510aefdeaf72e8d706119ca029cd958a82 Mon Sep 17 00:00:00 2001 From: Andy McCrae Date: Thu, 30 Jan 2014 12:02:09 +0000 Subject: [PATCH] Rubocop cleanup - removing individual directory .rubocop.yml files - Remove directory/.rubocop.yml files - Adjust Strainerfile to use the single .rubocop.yml - Adjust .rubocop.yml ot reference all directories Change-Id: I4323a1d1b626001c0b0dc05bec473b16c637f485 Addresses: blueprint rubocop-for-metering --- .rubocop.yml | 23 +++++++++++++++++++---- Strainerfile | 6 +----- attributes/.rubocop.yml | 7 ------- recipes/.rubocop.yml | 3 --- spec/.rubocop.yml | 7 ------- 5 files changed, 20 insertions(+), 26 deletions(-) delete mode 100644 attributes/.rubocop.yml delete mode 100644 recipes/.rubocop.yml delete mode 100644 spec/.rubocop.yml diff --git a/.rubocop.yml b/.rubocop.yml index 7a296ac..afc22bc 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,7 +1,22 @@ -# UTF-8 headers not generally in these files -Encoding: - Enabled: false +AllCops: + Includes: + - metadata.rb + - Gemfile + - attributes/** + - recipes/** + - spec/** + Excludes: + - libraries/** + - providers/** + - resources/** + +Encoding: + Exclude: + - metadata.rb + - Gemfile -# ignore long lines LineLength: Enabled: false + +WordArray: + MinSize: 3 diff --git a/Strainerfile b/Strainerfile index 20ed032..44e3e14 100644 --- a/Strainerfile +++ b/Strainerfile @@ -1,9 +1,5 @@ # Strainerfile -rubocop: bundle exec rubocop $SANDBOX/$COOKBOOK/Gemfile $SANDBOX/$COOKBOOK/metadata.rb --config $SANDBOX/$COOKBOOK/.rubocop.yml -rubocop: bundle exec rubocop $SANDBOX/$COOKBOOK/attributes/ --config $SANDBOX/$COOKBOOK/attributes/.rubocop.yml -rubocop: bundle exec rubocop $SANDBOX/$COOKBOOK/recipes/ --config $SANDBOX/$COOKBOOK/recipes/.rubocop.yml -rubocop: bundle exec rubocop $SANDBOX/$COOKBOOK/spec/ --config $SANDBOX/$COOKBOOK/spec/.rubocop.yml -# rubocop: bundle exec rubocop $SANDBOX/$COOKBOOK +rubocop: bundle exec rubocop $SANDBOX/$COOKBOOK knife test: bundle exec knife cookbook test $COOKBOOK foodcritic: bundle exec foodcritic -f any -t ~FC003 -t ~FC023 $SANDBOX/$COOKBOOK chefspec: bundle exec rspec $SANDBOX/$COOKBOOK/spec diff --git a/attributes/.rubocop.yml b/attributes/.rubocop.yml deleted file mode 100644 index d1017a7..0000000 --- a/attributes/.rubocop.yml +++ /dev/null @@ -1,7 +0,0 @@ -# embedded attributes make for long lines -LineLength: - Enabled: false - -# Allow small arrays before forcing %w or %W -WordArray: - MinSize: 3 diff --git a/recipes/.rubocop.yml b/recipes/.rubocop.yml deleted file mode 100644 index 446ebc4..0000000 --- a/recipes/.rubocop.yml +++ /dev/null @@ -1,3 +0,0 @@ -# embedded attributes make for long lines -LineLength: - Enabled: false diff --git a/spec/.rubocop.yml b/spec/.rubocop.yml deleted file mode 100644 index d1017a7..0000000 --- a/spec/.rubocop.yml +++ /dev/null @@ -1,7 +0,0 @@ -# embedded attributes make for long lines -LineLength: - Enabled: false - -# Allow small arrays before forcing %w or %W -WordArray: - MinSize: 3