Skip to content

Commit 614c645

Browse files
committed
Revert "Bump RuboCop to 0.47.1 (#89)"
This reverts commit dbaeb02.
1 parent dbaeb02 commit 614c645

File tree

76 files changed

+72
-1208
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+72
-1208
lines changed

Dockerfile

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ WORKDIR /usr/src/app
44
COPY Gemfile /usr/src/app/
55
COPY Gemfile.lock /usr/src/app/
66

7-
RUN gem update --system && \
8-
gem install bundler && \
7+
RUN gem install bundler && \
98
bundle install -j 4 && \
109
rm -fr /usr/share/ri
1110

Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ source 'https://rubygems.org'
55
gem "activesupport", require: false
66
gem "parser", "~> 2.3.3.1"
77
gem "pry", require: false
8-
gem "rubocop", "~> 0.47.1", require: false
8+
gem "rubocop", "~> 0.45", require: false
99
gem "rubocop-migrations", require: false
1010
gem "rubocop-rspec", require: false
1111
gem "safe_yaml"

Gemfile.lock

+6-6
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ GEM
2020
coderay (~> 1.1.0)
2121
method_source (~> 0.8.1)
2222
slop (~> 3.4)
23-
rainbow (2.2.1)
23+
rainbow (2.1.0)
2424
rake (12.0.0)
2525
rspec (3.5.0)
2626
rspec-core (~> 3.5.0)
@@ -35,8 +35,8 @@ GEM
3535
diff-lcs (>= 1.2.0, < 2.0)
3636
rspec-support (~> 3.5.0)
3737
rspec-support (3.5.0)
38-
rubocop (0.47.1)
39-
parser (>= 2.3.3.1, < 3.0)
38+
rubocop (0.46.0)
39+
parser (>= 2.3.1.1, < 3.0)
4040
powerpack (~> 0.1)
4141
rainbow (>= 1.99.1, < 3.0)
4242
ruby-progressbar (~> 1.7)
@@ -51,7 +51,7 @@ GEM
5151
thread_safe (0.3.5)
5252
tzinfo (1.2.2)
5353
thread_safe (~> 0.1)
54-
unicode-display_width (1.1.3)
54+
unicode-display_width (1.1.2)
5555

5656
PLATFORMS
5757
ruby
@@ -62,10 +62,10 @@ DEPENDENCIES
6262
pry
6363
rake
6464
rspec
65-
rubocop (~> 0.47.1)
65+
rubocop (~> 0.45)
6666
rubocop-migrations
6767
rubocop-rspec
6868
safe_yaml
6969

7070
BUNDLED WITH
71-
1.14.4
71+
1.13.6

config/contents/lint/ambiguous_operator.md

+4-9
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,11 @@ This cop checks for ambiguous operators in the first argument of a
22
method invocation without parentheses.
33

44
### Example:
5-
6-
# bad
5+
array = [1, 2, 3]
76

87
# The `*` is interpreted as a splat operator but it could possibly be
9-
# a `*` method invocation (i.e. `do_something.*(some_array)`).
10-
do_something *some_array
11-
12-
### Example:
13-
14-
# good
8+
# a `*` method invocation (i.e. `do_something.*(array)`).
9+
do_something *array
1510

1611
# With parentheses, there's no ambiguity.
17-
do_something(*some_array)
12+
do_something(*array)

config/contents/lint/ambiguous_regexp_literal.md

-7
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,10 @@ This cop checks for ambiguous regexp literals in the first argument of
22
a method invocation without parentheses.
33

44
### Example:
5-
6-
# bad
7-
85
# This is interpreted as a method invocation with a regexp literal,
96
# but it could possibly be `/` method invocations.
107
# (i.e. `do_something./(pattern)./(i)`)
118
do_something /pattern/i
129

13-
### Example:
14-
15-
# good
16-
1710
# With parentheses, there's no ambiguity.
1811
do_something(/pattern/i)

config/contents/lint/assignment_in_condition.md

-18
This file was deleted.

config/contents/lint/block_alignment.md

+5-27
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
This cop checks whether the end keywords are aligned properly for do
22
end blocks.
33

4-
Three modes are supported through the `EnforcedStyleAlignWith`
5-
configuration parameter:
4+
Three modes are supported through the `AlignWith` configuration
5+
parameter:
66

77
`start_of_block` : the `end` shall be aligned with the
88
start of the line where the `do` appeared.
@@ -15,40 +15,18 @@ location. The autofixer will default to `start_of_line`.
1515

1616
### Example:
1717

18-
# bad
19-
20-
foo.bar
21-
.each do
22-
baz
23-
end
24-
25-
### Example:
26-
27-
# EnforcedStyleAlignWith: either (default)
28-
29-
# good
30-
18+
# either
3119
variable = lambda do |i|
3220
i
3321
end
3422

35-
### Example:
36-
37-
# EnforcedStyleAlignWith: start_of_block
38-
39-
# good
40-
23+
# start_of_block
4124
foo.bar
4225
.each do
4326
baz
4427
end
4528

46-
### Example:
47-
48-
# EnforcedStyleAlignWith: start_of_line
49-
50-
# good
51-
29+
# start_of_line
5230
foo.bar
5331
.each do
5432
baz

config/contents/lint/circular_argument_reference.md

-14
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,27 @@ arguments and optional ordinal arguments.
44
This cop mirrors a warning produced by MRI since 2.2.
55

66
### Example:
7-
87
# bad
9-
108
def bake(pie: pie)
119
pie.heat_up
1210
end
1311

14-
### Example:
15-
1612
# good
17-
1813
def bake(pie:)
1914
pie.refrigerate
2015
end
2116

22-
### Example:
23-
2417
# good
25-
2618
def bake(pie: self.pie)
2719
pie.feed_to(user)
2820
end
2921

30-
### Example:
31-
3222
# bad
33-
3423
def cook(dry_ingredients = dry_ingredients)
3524
dry_ingredients.reduce(&:+)
3625
end
3726

38-
### Example:
39-
4027
# good
41-
4228
def cook(dry_ingredients = self.dry_ingredients)
4329
dry_ingredients.combine
4430
end

config/contents/lint/condition_position.md

-10
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,7 @@ if/while/until.
33

44
### Example:
55

6-
# bad
7-
86
if
97
some_condition
108
do_something
11-
end
12-
13-
### Example:
14-
15-
# good
16-
17-
if some_condition
18-
do_something
199
end

config/contents/lint/debugger.md

-29
This file was deleted.
+2-22
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,13 @@
11
This cop checks whether the end keywords of method definitions are
22
aligned properly.
33

4-
Two modes are supported through the EnforcedStyleAlignWith configuration
4+
Two modes are supported through the AlignWith configuration
55
parameter. If it's set to `start_of_line` (which is the default), the
66
`end` shall be aligned with the start of the line where the `def`
77
keyword is. If it's set to `def`, the `end` shall be aligned with the
88
`def` keyword.
99

1010
### Example:
1111

12-
# bad
13-
14-
private def foo
15-
end
16-
17-
### Example:
18-
19-
# EnforcedStyleAlignWith: start_of_line (default)
20-
21-
# good
22-
23-
private def foo
24-
end
25-
26-
### Example:
27-
28-
# EnforcedStyleAlignWith: def
29-
30-
# good
31-
3212
private def foo
33-
end
13+
end

config/contents/lint/deprecated_class_methods.md

-13
This file was deleted.

config/contents/lint/duplicate_case_condition.md

+7-19
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,10 @@ used in case 'when' expressions.
33

44
### Example:
55

6-
# bad
7-
8-
case x
9-
when 'first'
10-
do_something
11-
when 'first'
12-
do_something_else
13-
end
14-
15-
### Example:
16-
17-
# good
18-
19-
case x
20-
when 'first
21-
do_something
22-
when 'second'
23-
do_something_else
24-
end
6+
# bad
7+
case x
8+
when 'first'
9+
do_something
10+
when 'first'
11+
do_something_else
12+
end

config/contents/lint/duplicate_methods.md

-14
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,11 @@ This cop checks for duplicated instance (or singleton) method
22
definitions.
33

44
### Example:
5-
65
# bad
7-
86
def duplicated
97
1
108
end
119

1210
def duplicated
1311
2
14-
end
15-
16-
### Example:
17-
18-
# good
19-
20-
def duplicated
21-
1
22-
end
23-
24-
def other_duplicated
25-
2
2612
end

config/contents/lint/duplicated_key.md

+1-10
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,4 @@ This cop checks for duplicated keys in hash literals.
33
This cop mirrors a warning in Ruby 2.2.
44

55
### Example:
6-
7-
# bad
8-
9-
hash = { food: 'apple', food: 'orange' }
10-
11-
### Example:
12-
13-
# good
14-
15-
hash = { food: 'apple', other_food: 'orange' }
6+
hash = { food: 'apple', food: 'orange' }

0 commit comments

Comments
 (0)