From 8c158aa778ced63fb56349b7c3a5370f6f5de565 Mon Sep 17 00:00:00 2001 From: Dan Kubb Date: Sun, 14 Jul 2013 14:27:38 -0700 Subject: [PATCH] Add rubocop default configuration --- config/rubocop.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 config/rubocop.yml diff --git a/config/rubocop.yml b/config/rubocop.yml new file mode 100644 index 00000000..af82f0cb --- /dev/null +++ b/config/rubocop.yml @@ -0,0 +1,31 @@ +AllCops: + Includes: + - '../**/*.rake' + Excludes: + - '../vendor/**' + +# Avoid parameter lists longer than five parameters. +ParameterLists: + Max: 3 + CountKeywordArgs: true + +# Avoid more than `Max` levels of nesting. +BlockNesting: + Max: 3 + +# Align with the style guide. +CollectionMethods: + PreferredMethods: + collect: 'map' + inject: 'reduce' + find: 'detect' + find_all: 'select' + +# Do not force public/protected/private keyword to be indented at the same +# level as the def keyword. My personal preference is to outdent these keywords +# because I think when scanning code it makes it easier to identify the +# sections of code and visually separate them. When the keyword is at the same +# level I think it sort of blends in with the def keywords and makes it harder +# to scan the code and see where the sections are. +AccessControl: + Enabled: false