Skip to content

Commit e080de7

Browse files
Fix new offenses
1 parent 5f4b1d8 commit e080de7

File tree

3 files changed

+25
-25
lines changed

3 files changed

+25
-25
lines changed

spec/ameba/rule/documentation/documentation_spec.cr

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ module Ameba::Rule::Documentation
2929
3030
private macro bag
3131
end
32-
CRYSTAL
32+
CRYSTAL
3333
end
3434

3535
it "passes for documented public types" do
@@ -59,31 +59,31 @@ module Ameba::Rule::Documentation
5959
# bag
6060
macro bag
6161
end
62-
CRYSTAL
62+
CRYSTAL
6363
end
6464

6565
it "fails if there is an undocumented public type" do
6666
expect_issue subject, <<-CRYSTAL
6767
class Foo
68-
# ^^^^^^^^^ error: Missing documentation
68+
# ^^^^^^^ error: Missing documentation
6969
end
7070
7171
module Bar
72-
# ^^^^^^^^^^ error: Missing documentation
72+
# ^^^^^^^^ error: Missing documentation
7373
end
7474
7575
enum Baz
76-
# ^^^^^^^^ error: Missing documentation
76+
# ^^^^^^ error: Missing documentation
7777
end
7878
7979
def bat
80-
# ^^^^^^^ error: Missing documentation
80+
# ^^^^^ error: Missing documentation
8181
end
8282
8383
macro bag
84-
# ^^^^^^^^^ error: Missing documentation
84+
# ^^^^^^^ error: Missing documentation
8585
end
86-
CRYSTAL
86+
CRYSTAL
8787
end
8888

8989
context "properties" do

spec/ameba/rule/lint/empty_ensure_spec.cr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@ module Ameba::Rule::Lint
2323
ensure
2424
nil
2525
end
26-
CRYSTAL
26+
CRYSTAL
2727
end
2828

2929
it "fails if there is an empty ensure in method" do
3030
expect_issue subject, <<-CRYSTAL
3131
def method
3232
do_some_stuff
3333
ensure
34-
# ^^^^^^ error: Empty `ensure` block detected
34+
# ^^^^ error: Empty `ensure` block detected
3535
end
36-
CRYSTAL
36+
CRYSTAL
3737
end
3838

3939
it "fails if there is an empty ensure in a block" do
@@ -43,10 +43,10 @@ module Ameba::Rule::Lint
4343
rescue
4444
do_some_other_stuff
4545
ensure
46-
# ^^^^^^ error: Empty `ensure` block detected
46+
# ^^^^ error: Empty `ensure` block detected
4747
# nothing here
4848
end
49-
CRYSTAL
49+
CRYSTAL
5050
end
5151
end
5252
end

spec/ameba/rule/lint/shadowed_exception_spec.cr

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module Ameba::Rule::Lint
2525
rescue e : Exception
2626
handle_exception
2727
end
28-
CRYSTAL
28+
CRYSTAL
2929
end
3030

3131
it "fails if there is a shadowed exception" do
@@ -38,7 +38,7 @@ module Ameba::Rule::Lint
3838
# ^^^^^^^^^^^^^ error: Shadowed exception found: `ArgumentError`
3939
handle_argument_error_exception
4040
end
41-
CRYSTAL
41+
CRYSTAL
4242
end
4343

4444
it "fails if there is a custom shadowed exceptions" do
@@ -51,7 +51,7 @@ module Ameba::Rule::Lint
5151
# ^^^^^^^^^^^^^^^^ error: Shadowed exception found: `MySuperException`
5252
3
5353
end
54-
CRYSTAL
54+
CRYSTAL
5555
end
5656

5757
it "fails if there is a shadowed exception in a type list" do
@@ -60,7 +60,7 @@ module Ameba::Rule::Lint
6060
rescue Exception | IndexError
6161
# ^^^^^^^^^^ error: Shadowed exception found: `IndexError`
6262
end
63-
CRYSTAL
63+
CRYSTAL
6464
end
6565

6666
it "fails if there is a first shadowed exception in a type list" do
@@ -72,7 +72,7 @@ module Ameba::Rule::Lint
7272
# ^^^^^^^^^ error: Shadowed exception found: `Exception`
7373
rescue
7474
end
75-
CRYSTAL
75+
CRYSTAL
7676
end
7777

7878
it "fails if there is a shadowed duplicated exception" do
@@ -83,7 +83,7 @@ module Ameba::Rule::Lint
8383
rescue IndexError
8484
# ^^^^^^^^^^ error: Shadowed exception found: `IndexError`
8585
end
86-
CRYSTAL
86+
CRYSTAL
8787
end
8888

8989
it "fails if there is a shadowed duplicated exception in a type list" do
@@ -93,7 +93,7 @@ module Ameba::Rule::Lint
9393
rescue ArgumentError | IndexError
9494
# ^^^^^^^^^^ error: Shadowed exception found: `IndexError`
9595
end
96-
CRYSTAL
96+
CRYSTAL
9797
end
9898

9999
it "fails if there is only shadowed duplicated exceptions" do
@@ -104,7 +104,7 @@ module Ameba::Rule::Lint
104104
# ^^^^^^^^^^ error: Shadowed exception found: `IndexError`
105105
rescue Exception
106106
end
107-
CRYSTAL
107+
CRYSTAL
108108
end
109109

110110
it "fails if there is only shadowed duplicated exceptions in a type list" do
@@ -113,7 +113,7 @@ module Ameba::Rule::Lint
113113
rescue IndexError | IndexError
114114
# ^^^^^^^^^^ error: Shadowed exception found: `IndexError`
115115
end
116-
CRYSTAL
116+
CRYSTAL
117117
end
118118

119119
it "fails if all rescues are shadowed and there is a catch-all rescue" do
@@ -129,7 +129,7 @@ module Ameba::Rule::Lint
129129
# ^^^^^^^^ error: Shadowed exception found: `KeyError`
130130
rescue
131131
end
132-
CRYSTAL
132+
CRYSTAL
133133
end
134134

135135
it "fails if there are shadowed exception with args" do
@@ -140,7 +140,7 @@ module Ameba::Rule::Lint
140140
# ^^^^^^^^^^ error: Shadowed exception found: `IndexError`
141141
rescue
142142
end
143-
CRYSTAL
143+
CRYSTAL
144144
end
145145

146146
it "fails if there are multiple shadowed exceptions" do
@@ -152,7 +152,7 @@ module Ameba::Rule::Lint
152152
rescue IndexError
153153
# ^^^^^^^^^^ error: Shadowed exception found: `IndexError`
154154
end
155-
CRYSTAL
155+
CRYSTAL
156156
end
157157

158158
it "fails if there are multiple shadowed exceptions in a type list" do

0 commit comments

Comments
 (0)