Skip to content

Commit

Permalink
Check RuboCop To-do
Browse files Browse the repository at this point in the history
- Rearrange .rubocop_todo.yml list
  • Loading branch information
jlduran committed May 11, 2018
1 parent 4bdf438 commit a304eb4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 23 deletions.
6 changes: 6 additions & 0 deletions .rubocop.yml
Expand Up @@ -8,5 +8,11 @@ AllCops:
Style/AsciiComments:
Enabled: false

Style/Documentation:
Enabled: false

Metrics/LineLength:
Enabled: false

Naming/FileName:
Enabled: false
17 changes: 1 addition & 16 deletions .rubocop_todo.yml
@@ -1,27 +1,12 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2018-03-09 00:00:00 -0000 using RuboCop version 0.53.0.
# on 2018-05-11 00:00:00 -0000 using RuboCop version 0.55.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 1
Metrics/AbcSize:
Exclude:
- 'lib/numbers_and_words/translations/fr.rb'

# Offense count: 104
Style/Documentation:
Enabled: false

# Offense count: 1
Style/MethodMissing:
Exclude:
- 'lib/numbers_and_words/strategies/figures_converter/options.rb'

# Offense count: 90
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https
Metrics/LineLength:
Max: 123
12 changes: 5 additions & 7 deletions lib/numbers_and_words/translations/fr.rb
Expand Up @@ -13,13 +13,11 @@ def tens(number, options = {})
super number, options
end

def tens_with_ones(numbers, _options = {})
if [7, 9].include? numbers[1]
[tens(numbers[1] - 1, alone: false), teens(numbers)].join('-')
else
separator = numbers[0] == 1 ? " #{union} " : '-'
[tens(numbers[1], alone: false), ones(numbers[0])].join(separator)
end
def tens_with_ones(numbers, options = {})
return [tens(numbers[1] - 1, alone: false), teens(numbers)].join('-') if [7, 9].include? numbers[1]

separator = numbers[0] == 1 ? " #{union} " : '-'
super numbers, options.merge(separator: separator)
end

def hundreds(number, options = {})
Expand Down

0 comments on commit a304eb4

Please sign in to comment.