Merge pull request #3295 from reitermarkus/code-style

Set RuboCop maximum to current maximum.
This commit is contained in:
Markus Reiter 2017-10-12 19:55:01 +02:00 committed by GitHub
commit 04801a2824
5 changed files with 21 additions and 15 deletions

View File

@ -63,26 +63,26 @@ Metrics/AbcSize:
Max: 250
Metrics/BlockLength:
Max: 1250
Max: 144
Metrics/ClassLength:
Max: 1500
Max: 589
Metrics/CyclomaticComplexity:
Max: 75
Metrics/LineLength:
Max: 400
Max: 324
Metrics/MethodLength:
Max: 250
Max: 222
Metrics/ModuleLength:
CountComments: false
Exclude:
- '**/bin/**/*'
- '**/cmd/**/*'
- '**/lib/**/*'
Max: 367
Metrics/ParameterLists:
CountKeywordArgs: false
Metrics/PerceivedComplexity:
Max: 100

View File

@ -25,14 +25,20 @@ Lint/NestedMethodDefinition:
Lint/ParenthesesAsGroupedExpression:
Enabled: true
Metrics/BlockLength:
Max: 1250
Metrics/BlockNesting:
Max: 5
Metrics/ModuleLength:
Max: 360
Metrics/ClassLength:
Max: 1226
Metrics/ParameterLists:
CountKeywordArgs: false
Metrics/LineLength:
Max: 244
Metrics/MethodLength:
Max: 195
# we won't change backward compatible method names
Naming/MethodName:

View File

@ -109,7 +109,7 @@ module Homebrew
args << "--config" << HOMEBREW_LIBRARY_PATH/".rubocop.yml"
args << HOMEBREW_LIBRARY_PATH
else
args << "--config" << HOMEBREW_LIBRARY/".auditcops.yml"
args << "--config" << HOMEBREW_LIBRARY/".rubocop_audit.yml"
args += files
end

View File

@ -4,12 +4,12 @@ describe "brew style" do
around(:each) do |example|
begin
FileUtils.ln_s HOMEBREW_LIBRARY_PATH, HOMEBREW_LIBRARY/"Homebrew"
FileUtils.ln_s HOMEBREW_LIBRARY_PATH.parent/".rubocop.yml", HOMEBREW_LIBRARY/".auditcops.yml"
FileUtils.ln_s HOMEBREW_LIBRARY_PATH.parent/".rubocop.yml", HOMEBREW_LIBRARY/".rubocop_audit.yml"
example.run
ensure
FileUtils.rm_f HOMEBREW_LIBRARY/"Homebrew"
FileUtils.rm_f HOMEBREW_LIBRARY/".auditcops.yml"
FileUtils.rm_f HOMEBREW_LIBRARY/".rubocop_audit.yml"
end
end