Skip to content

Commit

Permalink
Bump RuboCop to 1.10.0
Browse files Browse the repository at this point in the history
Closes #2267.

This PR bumps RuboCop to 1.10.0 and disables `Naming/VariableNumber` as
there is no strong reason to change the names below.

```console
% bundle exec rubocop --only Naming/VariableNumber
(snip)

Offenses:

lib/faker/default/invoice.rb:107:11: C: Naming/VariableNumber: Use
normalcase for method name numbers.
def method_731(base)
    ^^^^^^^^^^
lib/faker/default/source.rb:68:11: C: Naming/VariableNumber: Use
normalcase for method name numbers.
def print_1_to_10(legacy_lang = NOT_GIVEN, lang: :ruby)
    ^^^^^^^^^^^^^
test/faker/default/test_faker_id_number.rb:157:7: C:
Naming/VariableNumber: Use normalcase for method name numbers.
def test_chilean_verification_code_0
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
test/faker/default/test_faker_internet.rb:148:7: C:
Naming/VariableNumber: Use normalcase for method name numbers.
def test_password_with_min_length_eq_1
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
test/faker/default/test_faker_national_health_service.rb:14:7: C:
Naming/VariableNumber: Use normalcase for method name numbers.
def test_nhs_check_digit_equals_10
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
test/faker/default/test_faker_national_health_service.rb:24:7: C:
Naming/VariableNumber: Use normalcase for method name numbers.
def test_nhs_check_digit_11
    ^^^^^^^^^^^^^^^^^^^^^^^
test/test_bg_locale.rb:47:7: C: Naming/VariableNumber: Use normalcase
for method name numbers.
def test_bg_cell_number_starts_wiht_08
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
test/test_ca_cat_locale.rb:29:7: C: Naming/VariableNumber: Use
normalcase for method name numbers.
def test_ca_cat_phone_numbers_start_with_9
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
test/test_ca_cat_locale.rb:34:7: C: Naming/VariableNumber: Use
normalcase for method name numbers.
def test_ca_cat_cell_numbers_start_with_6
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
test/test_en_au_locale.rb:32:7: C: Naming/VariableNumber: Use normalcase
for method name numbers.
def test_aussie_mobiles_start_with_04
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
test/test_en_ng_locale.rb:36:7: C: Naming/VariableNumber: Use normalcase
for method name numbers.
def test_en_ng_phonenumber_starts_with_0
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

499 files inspected, 11 offenses detected
```
  • Loading branch information
koic committed Feb 23, 2021
1 parent 50bd84e commit 9a8a555
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 17 deletions.
4 changes: 4 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ Metrics/PerceivedComplexity:
Enabled: false
Max: 7

Naming/VariableNumber:
Description: Use the configured style when numbering symbols, methods and variables.
Enabled: false

Style/AsciiComments:
Description: This cop checks for non-ascii (non-English) characters in comments.
Exclude:
Expand Down
26 changes: 13 additions & 13 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PATH
GEM
remote: https://rubygems.org/
specs:
ast (2.4.1)
ast (2.4.2)
coderay (1.1.3)
concurrent-ruby (1.1.8)
docile (1.3.2)
Expand All @@ -16,29 +16,29 @@ GEM
json (2.3.0)
method_source (1.0.0)
minitest (5.14.3)
parallel (1.19.2)
parser (2.7.2.0)
parallel (1.20.1)
parser (3.0.0.0)
ast (~> 2.4.1)
power_assert (1.2.0)
pry (0.14.0)
coderay (~> 1.1)
method_source (~> 1.0)
rainbow (3.0.0)
rake (13.0.3)
regexp_parser (1.8.2)
regexp_parser (2.1.0)
rexml (3.2.4)
rubocop (1.1.0)
rubocop (1.10.0)
parallel (~> 1.10)
parser (>= 2.7.1.5)
parser (>= 3.0.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 1.0.1)
rubocop-ast (>= 1.2.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-ast (1.1.0)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.4.1)
parser (>= 2.7.1.5)
ruby-progressbar (1.10.1)
ruby-progressbar (1.11.0)
simplecov (0.17.1)
docile (~> 1.1)
json (>= 1.8, < 3)
Expand All @@ -47,7 +47,7 @@ GEM
test-unit (3.3.8)
power_assert
timecop (0.9.4)
unicode-display_width (1.7.0)
unicode-display_width (2.0.0)
yard (0.9.25)

PLATFORMS
Expand All @@ -58,7 +58,7 @@ DEPENDENCIES
minitest (= 5.14.3)
pry (= 0.14.0)
rake (= 13.0.3)
rubocop (= 1.1.0)
rubocop (= 1.10.0)
simplecov (= 0.17.1)
test-unit (= 3.3.8)
timecop (= 0.9.4)
Expand Down
2 changes: 1 addition & 1 deletion faker.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency('minitest', '5.14.3')
spec.add_development_dependency('pry', '0.14.0')
spec.add_development_dependency('rake', '13.0.3')
spec.add_development_dependency('rubocop', '1.1.0')
spec.add_development_dependency('rubocop', '1.10.0')
spec.add_development_dependency('simplecov', '0.17.1')
spec.add_development_dependency('test-unit', '3.3.8')
spec.add_development_dependency('timecop', '0.9.4')
Expand Down
3 changes: 0 additions & 3 deletions lib/helpers/unique_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ def initialize(generator, max_retries)
@previous_results = Hash.new { |hash, key| hash[key] = Set.new }
end

# rubocop:disable Lint/MissingSuper
def method_missing(name, *arguments)
self.class.marked_unique.add(self)

Expand All @@ -29,8 +28,6 @@ def method_missing(name, *arguments)

raise RetryLimitExceeded, "Retry limit exceeded for #{name}"
end
# rubocop:enable Lint/MissingSuper

# Have method_missing use ruby 2.x keywords if the method exists.
# This is necessary because the syntax for passing arguments (`...`)
# is invalid on versions before Ruby 2.7, so it can't be used.
Expand Down

0 comments on commit 9a8a555

Please sign in to comment.