aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2017-10-27 14:44:18 +0100
committerGitHub2017-10-27 14:44:18 +0100
commit2be11f604005ea20b582cec2daea2315ec867f66 (patch)
tree96313a1cac5522beeb509a2ac40a7ba4c5b6bbb0 /Library
parent32ce927cae5bb9462d88972119846d51c3447483 (diff)
parent47bfad64b05346fc6ba2e0c57cc6c1e2318c109c (diff)
downloadbrew-2be11f604005ea20b582cec2daea2315ec867f66.tar.bz2
Merge pull request #3373 from MikeMcQuaid/max-line-length
rubocop.yml: reduce tap maximum line length.
Diffstat (limited to 'Library')
-rw-r--r--Library/.rubocop.yml9
-rw-r--r--Library/Homebrew/.rubocop.yml16
-rw-r--r--Library/Homebrew/test/support/fixtures/test.flacbin0 -> 98 bytes
3 files changed, 21 insertions, 4 deletions
diff --git a/Library/.rubocop.yml b/Library/.rubocop.yml
index 2580668b4..051a57f93 100644
--- a/Library/.rubocop.yml
+++ b/Library/.rubocop.yml
@@ -58,7 +58,7 @@ Lint/EndAlignment:
Lint/ParenthesesAsGroupedExpression:
Enabled: false
-# TODO: try to bring down all metrics maximums
+# most metrics don't make sense to apply for formulae/taps
Metrics/AbcSize:
Enabled: false
@@ -72,9 +72,10 @@ Metrics/CyclomaticComplexity:
Enabled: false
Metrics/LineLength:
- Max: 324
- # ignore manpage comments
- IgnoredPatterns: ['#: ']
+ # 124 is the goal as GitHub diff UI wraps beyond that
+ Max: 190
+ # ignore manpage comments and long single-line strings
+ IgnoredPatterns: ['#: ', ' url "', ' mirror "', ' plist_options :']
Metrics/MethodLength:
Enabled: false
diff --git a/Library/Homebrew/.rubocop.yml b/Library/Homebrew/.rubocop.yml
index 0e1fb2d04..354867738 100644
--- a/Library/Homebrew/.rubocop.yml
+++ b/Library/Homebrew/.rubocop.yml
@@ -25,6 +25,10 @@ Lint/NestedMethodDefinition:
Lint/ParenthesesAsGroupedExpression:
Enabled: true
+# TODO: try to bring down all metrics maximums
+Metrics/AbcSize:
+ Max: 250
+
Metrics/BlockLength:
Max: 1250
@@ -34,12 +38,24 @@ Metrics/BlockNesting:
Metrics/ClassLength:
Max: 1226
+Metrics/CyclomaticComplexity:
+ Max: 75
+
Metrics/LineLength:
+ # 124 is the goal as GitHub diff UI wraps beyond that
Max: 244
+ # ignore manpage comments
+ IgnoredPatterns: ['#: ']
Metrics/MethodLength:
Max: 195
+Metrics/ModuleLength:
+ Max: 222
+
+Metrics/PerceivedComplexity:
+ Max: 100
+
# we won't change backward compatible method names
Naming/MethodName:
Exclude:
diff --git a/Library/Homebrew/test/support/fixtures/test.flac b/Library/Homebrew/test/support/fixtures/test.flac
new file mode 100644
index 000000000..253f14a71
--- /dev/null
+++ b/Library/Homebrew/test/support/fixtures/test.flac
Binary files differ