Skip to content

Commit

Permalink
Update RuboCop rules
Browse files Browse the repository at this point in the history
  • Loading branch information
weppos committed Jan 7, 2017
1 parent 8dd04ed commit 0efc738
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 9 deletions.
41 changes: 36 additions & 5 deletions .rubocop_defaults.yml
Expand Up @@ -6,36 +6,67 @@ AllCops:
- 'tmp/**/*'
- 'vendor/**/*'

Lint/AmbiguousRegexpLiteral:
# [codesmell]
Metrics/AbcSize:
Enabled: false
Exclude:
- 'spec/**/*_spec.rb'
- 'test/**/*_test.rb'

# [codesmell]
Metrics/AbcSize:
Metrics/BlockLength:
Enabled: false

# [codesmell]
Metrics/CyclomaticComplexity:
Enabled: false
Exclude:
- 'spec/**/*_spec.rb'
- 'test/**/*_test.rb'

# [codesmell]
Metrics/ClassLength:
Enabled: false
Exclude:
- 'spec/**/*_spec.rb'
- 'test/**/*_test.rb'

# [codesmell]
Metrics/LineLength:
Enabled: false
Exclude:
- 'spec/**/*_spec.rb'
- 'test/**/*_test.rb'
Max: 100

# [codesmell]
Metrics/MethodLength:
Enabled: false
Exclude:
- 'spec/**/*_spec.rb'
- 'test/**/*_test.rb'
Max: 15
Max: 10

# [codesmell]
Metrics/LineLength:
Metrics/ModuleLength:
Enabled: false
Exclude:
- 'spec/**/*_spec.rb'
- 'test/**/*_test.rb'
Max: 100

# [codesmell]
Metrics/ParameterLists:
Enabled: false
Max: 5

# [codesmell]
Metrics/PerceivedComplexity:
Enabled: false

# [codesmell]
# I don't really get the point of this cop.
Performance/RedundantMerge:
Enabled: false

# Do not use "and" or "or" in conditionals, but for readability we can use it
# to chain executions. Just beware of operator order.
Expand Down
3 changes: 0 additions & 3 deletions lib/public_suffix/list.rb
Expand Up @@ -70,8 +70,6 @@ def self.clear
self
end

# rubocop:disable Metrics/MethodLength

# Parse given +input+ treating the content as Public Suffix List.
#
# See http://publicsuffix.org/format/ for more details about input format.
Expand Down Expand Up @@ -109,7 +107,6 @@ def self.parse(input, private_domains: true)
end
end
end
# rubocop:enable Metrics/MethodLength


# Gets the array of rules.
Expand Down
2 changes: 1 addition & 1 deletion test/unit/public_suffix_test.rb
Expand Up @@ -169,7 +169,7 @@ def test_normalize_scheme
].each do |input, _|
error = PublicSuffix.normalize(input)
assert_instance_of PublicSuffix::DomainInvalid, error
assert_match /scheme/, error.message
assert_match(/scheme/, error.message)
end
end

Expand Down

0 comments on commit 0efc738

Please sign in to comment.