Skip to content

Commit 21115dd

Browse files
committed
Rescrape docs, update spec exclusion list
1 parent 72445ff commit 21115dd

File tree

201 files changed

+1717
-293
lines changed

Some content is hidden

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

201 files changed

+1717
-293
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
This cop checks for assignments in the conditions of
2+
if/while/until.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,33 @@
11
This cop checks whether the end keywords are aligned properly for do
22
end blocks.
33

4+
Three modes are supported through the `AlignWith` configuration
5+
parameter:
6+
7+
`start_of_block` : the `end` shall be aligned with the
8+
start of the line where the `do` appeared.
9+
10+
`start_of_line` : the `end` shall be aligned with the
11+
start of the line where the expression started.
12+
13+
`either` (which is the default) : the `end` is allowed to be in either
14+
location. The autofixer will default to `start_of_line`.
15+
416
### Example:
517

18+
# either
619
variable = lambda do |i|
720
i
21+
end
22+
23+
# start_of_block
24+
foo.bar
25+
.each do
26+
baz
27+
end
28+
29+
# start_of_line
30+
foo.bar
31+
.each do
32+
baz
833
end

config/contents/lint/debugger.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This cop checks for calls to debugger or pry.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This cop checks for uses of the deprecated class method usages.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
This cop checks that there are no repeated conditions
2+
used in case 'when' expressions.
3+
4+
### Example:
5+
6+
# bad
7+
case x
8+
when 'first'
9+
do_something
10+
when 'first'
11+
do_something_else
12+
end

config/contents/lint/empty_ensure.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This cop checks for empty `ensure` blocks
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
This cop checks for the presence of empty expressions.
2+
3+
### Example:
4+
5+
# bad
6+
foo = ()
7+
if ()
8+
bar
9+
end

config/contents/lint/empty_when.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
This cop checks for the presence of `when` branches without a body.
2+
3+
### Example:
4+
5+
# bad
6+
case foo
7+
when bar then 1
8+
when baz then # nothing
9+
end

config/contents/lint/end_in_method.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This cop checks for END blocks in method definitions.

config/contents/lint/ensure_return.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This cop checks for *return* from an *ensure* block.

0 commit comments

Comments
 (0)