Skip to content

Commit

Permalink
Merge pull request #3295 from reitermarkus/code-style
Browse files Browse the repository at this point in the history
Set RuboCop maximum to current maximum.
  • Loading branch information
reitermarkus authored Oct 12, 2017
2 parents 56458f0 + 71b6e23 commit 04801a2
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 15 deletions.
16 changes: 8 additions & 8 deletions Library/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
File renamed without changes.
14 changes: 10 additions & 4 deletions Library/Homebrew/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/LineLength:
Max: 244

Metrics/ParameterLists:
CountKeywordArgs: false
Metrics/MethodLength:
Max: 195

# we won't change backward compatible method names
Naming/MethodName:
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cmd/style.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def check_style_impl(files, output_type, options = {})
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

Expand Down
4 changes: 2 additions & 2 deletions Library/Homebrew/test/cmd/style_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
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

Expand Down

0 comments on commit 04801a2

Please sign in to comment.