aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2016-10-01 12:13:09 +0100
committerMike McQuaid2016-10-01 12:13:09 +0100
commit5b31507fdac6ae12141b3e84f70115610a7ae00c (patch)
tree714f611711b85d1d42134ac1a83c639036a2203f /Library
parentcea796c09bf3277b31029c4c417315e534d443d1 (diff)
downloadbrew-5b31507fdac6ae12141b3e84f70115610a7ae00c.tar.bz2
Use Library/.rubocop.yml file.
This allows having a shared style that’s use for Homebrew/brew and taps which can be overridden by Homebrew/brew.
Diffstat (limited to 'Library')
-rw-r--r--Library/.rubocop.yml (renamed from Library/.rubocop_common.yml)9
-rw-r--r--Library/Homebrew/.rubocop.yml2
-rw-r--r--Library/Homebrew/cmd/style.rb2
3 files changed, 11 insertions, 2 deletions
diff --git a/Library/.rubocop_common.yml b/Library/.rubocop.yml
index 3563acf1f..2fe239447 100644
--- a/Library/.rubocop_common.yml
+++ b/Library/.rubocop.yml
@@ -73,6 +73,15 @@ Style/EmptyLineBetweenDefs:
Style/FileName:
Regex: !ruby/regexp /^[\w\@\-\+\.]+(\.rb)?$/
+Style/GuardClause:
+ Enabled: false
+
+Style/HashSyntax:
+ EnforcedStyle: hash_rockets
+
+Style/IfUnlessModifier:
+ Enabled: false
+
Style/IndentArray:
EnforcedStyle: special_inside_parentheses
diff --git a/Library/Homebrew/.rubocop.yml b/Library/Homebrew/.rubocop.yml
index 0b5d67521..f4f80800a 100644
--- a/Library/Homebrew/.rubocop.yml
+++ b/Library/Homebrew/.rubocop.yml
@@ -1,5 +1,5 @@
inherit_from:
- - ../.rubocop_common.yml
+ - ../.rubocop.yml
- .rubocop_todo.yml
AllCops:
diff --git a/Library/Homebrew/cmd/style.rb b/Library/Homebrew/cmd/style.rb
index e44641f70..9934c6939 100644
--- a/Library/Homebrew/cmd/style.rb
+++ b/Library/Homebrew/cmd/style.rb
@@ -56,7 +56,7 @@ module Homebrew
args << "--config" << HOMEBREW_LIBRARY_PATH/".rubocop.yml"
args += [HOMEBREW_LIBRARY_PATH]
else
- args << "--config" << Tap::TAP_DIRECTORY/".rubocop.yml"
+ args << "--config" << HOMEBREW_LIBRARY/".rubocop.yml"
args << "--format" << "simple"
args += files
end