tailor 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. data/.tailor +1 -0
  2. data/Gemfile.lock +1 -1
  3. data/History.rdoc +34 -0
  4. data/README.rdoc +17 -1
  5. data/features/valid_ruby.feature +1 -1
  6. data/lib/ext/string_ext.rb +0 -4
  7. data/lib/tailor/cli/options.rb +9 -2
  8. data/lib/tailor/configuration.rb +103 -150
  9. data/lib/tailor/configuration/file_set.rb +110 -0
  10. data/lib/tailor/formatters/text.rb +108 -79
  11. data/lib/tailor/rake_task.rb +148 -0
  12. data/lib/tailor/tailorrc.erb +1 -1
  13. data/lib/tailor/version.rb +1 -1
  14. data/spec/functional/configuration_spec.rb +244 -0
  15. data/spec/functional/horizontal_spacing/braces_spec.rb +238 -0
  16. data/spec/functional/horizontal_spacing/brackets_spec.rb +88 -0
  17. data/spec/functional/horizontal_spacing/comma_spacing_spec.rb +68 -0
  18. data/spec/functional/horizontal_spacing/hard_tabs_spec.rb +110 -0
  19. data/spec/functional/horizontal_spacing/long_lines_spec.rb +51 -0
  20. data/spec/functional/horizontal_spacing/parens_spec.rb +102 -0
  21. data/spec/functional/horizontal_spacing/trailing_whitespace_spec.rb +66 -0
  22. data/spec/functional/horizontal_spacing_spec.rb +59 -0
  23. data/spec/functional/indentation_spacing/bad_indentation_spec.rb +372 -0
  24. data/spec/functional/indentation_spacing_spec.rb +85 -0
  25. data/spec/functional/naming/camel_case_methods_spec.rb +56 -0
  26. data/spec/functional/naming/screaming_snake_case_classes_spec.rb +83 -0
  27. data/spec/functional/naming_spec.rb +35 -0
  28. data/spec/functional/vertical_spacing/class_length_spec.rb +67 -0
  29. data/spec/functional/vertical_spacing/method_length_spec.rb +61 -0
  30. data/spec/functional/vertical_spacing_spec.rb +35 -0
  31. data/spec/support/bad_indentation_cases.rb +265 -0
  32. data/{features/support/file_cases/indentation_cases.rb → spec/support/good_indentation_cases.rb} +6 -266
  33. data/spec/support/horizontal_spacing_cases.rb +136 -0
  34. data/spec/support/naming_cases.rb +26 -0
  35. data/{features/support/file_cases → spec/support}/vertical_spacing_cases.rb +0 -33
  36. data/spec/{tailor → unit/tailor}/cli_spec.rb +1 -1
  37. data/spec/{tailor → unit/tailor}/composite_observable_spec.rb +1 -1
  38. data/spec/unit/tailor/configuration/file_set_spec.rb +65 -0
  39. data/spec/{tailor → unit/tailor}/configuration/style_spec.rb +1 -1
  40. data/spec/{tailor → unit/tailor}/configuration_spec.rb +1 -59
  41. data/spec/{tailor → unit/tailor}/critic_spec.rb +1 -1
  42. data/spec/{tailor → unit/tailor}/formatter_spec.rb +1 -1
  43. data/spec/{tailor → unit/tailor}/lexed_line_spec.rb +1 -1
  44. data/spec/{tailor → unit/tailor}/lexer/token_spec.rb +1 -1
  45. data/spec/{tailor → unit/tailor}/lexer_spec.rb +1 -2
  46. data/spec/{tailor → unit/tailor}/options_spec.rb +1 -1
  47. data/spec/{tailor → unit/tailor}/problem_spec.rb +1 -1
  48. data/spec/{tailor → unit/tailor}/reporter_spec.rb +1 -1
  49. data/spec/{tailor → unit/tailor}/ruler_spec.rb +1 -1
  50. data/spec/{tailor → unit/tailor}/rulers/indentation_spaces_ruler/indentation_manager_spec.rb +1 -1
  51. data/spec/{tailor → unit/tailor}/rulers/indentation_spaces_ruler_spec.rb +1 -1
  52. data/spec/{tailor → unit/tailor}/rulers/spaces_after_comma_ruler_spec.rb +1 -1
  53. data/spec/{tailor → unit/tailor}/rulers/spaces_after_lbrace_ruler_spec.rb +1 -1
  54. data/spec/{tailor → unit/tailor}/rulers/spaces_before_lbrace_ruler_spec.rb +1 -1
  55. data/spec/{tailor → unit/tailor}/rulers/spaces_before_rbrace_ruler_spec.rb +1 -1
  56. data/spec/{tailor → unit/tailor}/rulers_spec.rb +1 -1
  57. data/spec/unit/tailor/version_spec.rb +6 -0
  58. data/spec/{tailor_spec.rb → unit/tailor_spec.rb} +1 -1
  59. data/tasks/spec.rake +8 -3
  60. metadata +121 -93
  61. data/features/horizontal_spacing.feature +0 -263
  62. data/features/indentation/bad_files_with_no_trailing_newline.feature +0 -91
  63. data/features/indentation/good_files_with_no_trailing_newline.feature +0 -219
  64. data/features/name_detection.feature +0 -72
  65. data/features/support/file_cases/horizontal_spacing_cases.rb +0 -266
  66. data/features/support/file_cases/naming_cases.rb +0 -51
  67. data/features/vertical_spacing.feature +0 -135
  68. data/m.rb +0 -15
  69. data/spec/tailor/version_spec.rb +0 -6
@@ -1,263 +0,0 @@
1
- Feature: Horizontal spacing detection
2
- As a Ruby developer, I want to be able to detect horizontal spacing
3
- problems so that I can fix them.
4
-
5
- Background:
6
- Given my configuration file ".tailor" looks like:
7
- """
8
- Tailor.config do |config|
9
- config.file_set do |style|
10
- style.trailing_newlines 0
11
- end
12
- end
13
- """
14
-
15
- @bad_files @hard_tabs
16
-
17
- Scenario Outline: Detect hard tabs
18
- Given <File> exists without a newline at the end
19
- When I run `tailor -d -c .tailor <File>`
20
- Then the output should match /Total Problems.*<Count>/
21
- And the output should match /position: <Position>/
22
- And the output should match /position: <Position 2>/
23
- And the exit status should be 1
24
-
25
- Scenarios: Hard tab
26
- | File | Position | Position 2 | Count |
27
- | h_spacing/1/hard_tab | 2:0 | | 1 |
28
- | h_spacing/1/hard_tab_with_spaces | 3:0 | | 1 |
29
- | h_spacing/1/hard_tab_with_1_indented_space | 3:0 | | 1 |
30
- | h_spacing/2/hard_tab_with_2_indented_spaces | 3:0 | 3:5 | 2 |
31
-
32
- @bad_files @long_lines
33
-
34
- Scenario Outline: Detect long lines
35
- Given <File> exists without a newline at the end
36
- When I run `tailor -d -c .tailor <File>`
37
- Then the output should match /Total Problems.*<Count>/
38
- And the output should match /position: <Position>/
39
- And the exit status should be 1
40
-
41
- Scenarios:
42
- | File | Position | Count |
43
- | h_spacing/1/long_line_no_newline | 1:81 | 1 |
44
- | h_spacing/1/long_line_newline_at_82 | 1:81 | 1 |
45
-
46
- @good_files @long_lines
47
-
48
- Scenario Outline: Lines under long-line threshold
49
- Given <File> exists without a newline at the end
50
- When I run `tailor -d -c .tailor <File>`
51
- Then the output should match /Total Problems.*0/
52
- And the exit status should be 0
53
-
54
- Scenarios:
55
- | File |
56
- | h_spacing/ok/short_line_no_newline |
57
- | h_spacing/ok/short_line_newline_at_81 |
58
-
59
- @bad_files @trailing_spaces
60
-
61
- Scenario Outline: Lines with trailing spaces
62
- Given <File> exists without a newline at the end
63
- When I run `tailor -d -c .tailor <File>`
64
- Then the output should match /Total Problems.*<Count>/
65
- And the output should match /position: <Position>/
66
- And the exit status should be 1
67
-
68
- Scenarios:
69
- | File | Count | Position |
70
- | h_spacing/1/empty_line_with_spaces | 1 | 1:2 |
71
- | h_spacing/1/empty_line_with_spaces_in_method | 1 | 2:2 |
72
- | h_spacing/1/trailing_spaces_on_def | 1 | 1:10 |
73
-
74
- @bad_files @commas
75
-
76
- Scenario Outline: Lines with bad comma spacing
77
- Given <File> exists without a newline at the end
78
- When I run `tailor -d -c .tailor <File>`
79
- Then the output should match /Total Problems.*<Count>/
80
- And the output should match /position: <Position>/
81
- And the output should match /position: <Position 2>/
82
- And the exit status should be 1
83
-
84
- Scenarios:
85
- | File | Count | Position | Position 2 |
86
- | h_spacing/1/no_space_after_comma | 1 | 1:3 | |
87
- | h_spacing/1/two_spaces_after_comma | 1 | 1:3 | |
88
- | h_spacing/2/two_spaces_after_comma_twice | 2 | 1:3 | 1:7 |
89
- | h_spacing/1/one_space_before_comma | 1 | 1:4 | |
90
- | h_spacing/1/two_spaces_before_comma | 1 | 1:3 | |
91
- | h_spacing/2/two_spaces_before_comma_twice | 2 | 1:3 | 1:8 |
92
- | h_spacing/2/spaces_before_with_trailing_comments | 2 | 2:3 | 3:3 |
93
-
94
- @good_files @commas
95
-
96
- Scenario Outline: Lines with good comma spacing
97
- Given <File> exists without a newline at the end
98
- When I run `tailor -d -c .tailor <File>`
99
- Then the output should match /Total Problems.*0/
100
- And the exit status should be 0
101
-
102
- Scenarios:
103
- | File |
104
- | h_spacing/ok/space_after_comma_in_array |
105
- | h_spacing/ok/trailing_comma |
106
- | h_spacing/ok/trailing_comma_with_trailing_comment |
107
- | h_spacing/ok/line_ends_with_backslash |
108
-
109
- @good_files @braces
110
-
111
- Scenario Outline: Lines with good spacing around braces
112
- Given <File> exists without a newline at the end
113
- When I run `tailor -d -c .tailor <File>`
114
- Then the output should match /Total Problems.*0/
115
- And the exit status should be 0
116
-
117
- @single_line
118
- Scenarios: Single-line
119
- | File |
120
- | h_spacing/ok/empty_hash |
121
- | h_spacing/ok/single_line_hash |
122
- | h_spacing/ok/single_line_hash_lonely_braces |
123
- | h_spacing/ok/single_line_block |
124
- | h_spacing/ok/single_line_string_interp |
125
- | h_spacing/ok/single_line_block_in_string_interp |
126
- | h_spacing/ok/empty_hash_in_string_in_block |
127
- | h_spacing/ok/string_interp_with_colonop |
128
- | h_spacing/ok/hash_as_param_in_parens |
129
-
130
- @multi_line
131
- Scenarios: Multi-line
132
- | File |
133
- | h_spacing/ok/two_line_hash |
134
- | h_spacing/ok/two_line_hash_trailing_comment |
135
- | h_spacing/ok/three_line_hash |
136
- | h_spacing/ok/multi_line_braces_block |
137
- | h_spacing/ok/multi_line_qword_using_braces |
138
- | h_spacing/ok/empty_hash_in_multi_line_statement |
139
- | h_spacing/ok/multi_line_hash_in_multi_line_statement |
140
-
141
- @bad_files @braces
142
-
143
- Scenario Outline: Lines with bad spacing around braces
144
- Given <File> exists without a newline at the end
145
- When I run `tailor -d -c .tailor <File>`
146
- Then the output should match /Total Problems.*<Problems>/
147
- And the output should match /position: <Position>/
148
- And the output should match /position: <Position 2>/
149
- And the exit status should be 1
150
-
151
- @single_line
152
- Scenarios: Single-line
153
- | File | Position | Position 2 | Problems |
154
- | h_spacing/1/single_line_hash_2_spaces_before_lbrace | 1:9 | | 1 |
155
- | h_spacing/1/single_line_hash_2_spaces_before_rbrace | 1:25 | | 1 |
156
- | h_spacing/1/single_line_hash_2_spaces_after_lbrace | 1:9 | | 1 |
157
- | h_spacing/1/single_line_hash_0_spaces_before_lbrace | 1:7 | | 1 |
158
- | h_spacing/1/single_line_block_2_spaces_before_lbrace | 1:13 | | 1 |
159
- | h_spacing/1/single_line_block_in_string_interp_2_spaces_before_lbrace | 1:27 | | 1 |
160
- | h_spacing/1/single_line_block_0_spaces_before_lbrace | 1:11 | | 1 |
161
- | h_spacing/1/space_in_empty_hash_in_string_in_block | 1:36 | | 1 |
162
- | h_spacing/2/no_space_after_l_before_r_after_string_interp | 1:69 | 1:86 | 2 |
163
- | h_spacing/2/no_space_before_consecutive_rbraces | 1:72 | 1:73 | 2 |
164
-
165
- @multi_line
166
- Scenarios: Multi-line
167
- | File | Position | Position 2 | Problems |
168
- | h_spacing/1/two_line_hash_2_spaces_before_lbrace | 2:12 | | 1 |
169
- | h_spacing/1/two_line_hash_2_spaces_before_rbrace | 2:28 | | 1 |
170
- | h_spacing/1/two_line_hash_2_spaces_before_lbrace_lonely_braces | 2:12 | | 1 |
171
- | h_spacing/1/two_line_braces_block_2_spaces_before_lbrace | 1:13 | | 1 |
172
- | h_spacing/1/two_line_braces_block_0_spaces_before_lbrace_trailing_comment | 1:11 | | 1 |
173
-
174
- @good_files @brackets
175
-
176
- Scenario Outline: Lines with good spacing around brackets
177
- Given <File> exists without a newline at the end
178
- When I run `tailor -d -c .tailor <File>`
179
- Then the output should match /Total Problems.*0/
180
- And the exit status should be 0
181
-
182
- @single_line
183
- Scenarios: Single-line
184
- | File |
185
- | h_spacing/ok/empty_array |
186
- | h_spacing/ok/simple_array |
187
- | h_spacing/ok/two_d_array |
188
- | h_spacing/ok/hash_key_reference |
189
- | h_spacing/ok/array_of_hashes |
190
- | h_spacing/ok/array_of_symbols |
191
-
192
- @multi_line
193
- Scenarios: Multi-line
194
- | File |
195
- | h_spacing/ok/simple_array_lonely_brackets |
196
- | h_spacing/ok/simple_nested_array_lonely_brackets |
197
- | h_spacing/ok/empty_array_in_multi_line_statement |
198
-
199
- @bad_files @brackets
200
-
201
- Scenario Outline: Lines with bad spacing around brackets
202
- Given <File> exists without a newline at the end
203
- When I run `tailor -d -c .tailor <File>`
204
- Then the output should match /Total Problems.*<Problems>/
205
- And the output should match /position: <Position>/
206
- And the output should match /position: <Position 2>/
207
- And the exit status should be 1
208
-
209
- @single_line
210
- Scenarios: Single-line
211
- | File | Position | Position 2 | Problems |
212
- | h_spacing/1/space_in_empty_array | 1:1 | | 1 |
213
- | h_spacing/1/simple_array_space_after_lbracket | 1:1 | | 1 |
214
- | h_spacing/1/simple_array_space_before_rbracket | 1:9 | | 1 |
215
- | h_spacing/1/hash_key_ref_space_before_rbracket | 1:11 | | 1 |
216
- | h_spacing/1/hash_key_ref_space_after_lbracket | 1:6 | | 1 |
217
- | h_spacing/2/two_d_array_space_after_lbrackets | 1:1 | 1:14 | 2 |
218
- | h_spacing/2/two_d_array_space_before_rbrackets | 1:10 | 1:30 | 2 |
219
-
220
- @good_files @parens
221
-
222
- Scenario Outline: Lines with good spacing around parens
223
- Given <File> exists without a newline at the end
224
- When I run `tailor -d -c .tailor <File>`
225
- Then the output should match /Total Problems.*0/
226
- And the exit status should be 0
227
-
228
- @single_line
229
- Scenarios: Single-line
230
- | File |
231
- | h_spacing/ok/empty_parens |
232
- | h_spacing/ok/simple_method_call |
233
-
234
- @multi_line
235
- Scenarios: Multi-line
236
- | File |
237
- | h_spacing/ok/multi_line_method_call |
238
- | h_spacing/ok/multi_line_method_call_lonely_parens |
239
-
240
- @bad_files @parens
241
-
242
- Scenario Outline: Lines with bad spacing around parens
243
- Given <File> exists without a newline at the end
244
- When I run `tailor -d -c .tailor <File>`
245
- Then the output should match /Total Problems.*<Problems>/
246
- And the output should match /position: <Position>/
247
- And the output should match /position: <Position 2>/
248
- And the exit status should be 1
249
-
250
- @single_line
251
- Scenarios: Single-line
252
- | File | Position | Position 2 | Problems |
253
- | h_spacing/1/simple_method_call_space_after_lparen | 1:6 | | 1 |
254
- | h_spacing/1/simple_method_call_space_before_rparen | 1:15 | | 1 |
255
- | h_spacing/1/method_call_space_after_lparen_trailing_comment | 1:6 | | 1 |
256
- | h_spacing/2/method_call_space_after_lparen_before_rparen_trailing_comment | 1:6 | 1:16 | 2 |
257
-
258
- @multi_line
259
- Scenarios: Multi-line
260
- | File | Position | Position 2 | Problems |
261
- | h_spacing/1/multi_line_method_call_space_after_lparen | 1:6 | | 1 |
262
- | h_spacing/1/multi_line_method_call_space_after_lparen_trailing_comment | 1:6 | | 1 |
263
-
@@ -1,91 +0,0 @@
1
- @indentation
2
- Feature: Indentation check on bad fails without trailing newlines
3
-
4
- Background:
5
- Given my configuration file ".tailor" looks like:
6
- """
7
- Tailor.config do |config|
8
- config.file_set do |style|
9
- style.trailing_newlines 0
10
- end
11
- end
12
- """
13
-
14
- @bad_files
15
- Scenario Outline: Detect singular problems on poorly indented files
16
- Given <File> exists without a newline at the end
17
- When I run `tailor -d -c .tailor <File>`
18
- Then the output should match /Total Problems.*1/
19
- And the output should match /position: <Position>/
20
- And the exit status should be 1
21
-
22
- @multi_line @keywords
23
- Scenarios: 1 problem with classes
24
- | File | Position |
25
- | indent/1/class_indented_end | 2:1 |
26
- | indent/1/class_method_def_using_self_outdented | 2:1 |
27
-
28
-
29
- @single_line @keywords
30
- Scenarios: 1 problem with single-line statement
31
- | File | Position |
32
- | indent/1/class_indented_singlestatement | 2:3 |
33
- | indent/1/class_indented_singlestatement_trailing_comment | 2:3 |
34
- | indent/1/class_outdented_singlestatement | 2:1 |
35
- | indent/1/class_def_outdented_content | 3:3 |
36
-
37
- @multi_line @keywords
38
- Scenarios: 1 problem with def
39
- | File | Position |
40
- | indent/1/def_indented_end | 2:1 |
41
- | indent/1/def_content_indented_end | 3:1 |
42
- | indent/1/class_def_content_outdented_end | 4:1 |
43
-
44
- @multi_line @keywords @continuations
45
- Scenarios: 1 problem with case
46
- | File | Position |
47
- | indent/1/case_indented_whens_level | 2:3 |
48
- | indent/1/case_indented_whens_level_trailing_comment | 2:3 |
49
- | indent/1/case_outdented_whens_level | 2:1 |
50
- | indent/1/case_when_indented_whens_level | 3:3 |
51
- | indent/1/case_when_outdented_whens_level | 3:1 |
52
- | indent/1/case_indented_whens_in | 2:3 |
53
-
54
- @multi_line @keywords
55
- Scenarios: 1 problem with 'do' loop
56
- | File | Position |
57
- | indent/1/while_do_indented | 1:1 |
58
- | indent/1/while_do_indented2 | 4:1 |
59
- | indent/1/while_do_indented2_trailing_comment | 4:1 |
60
- | indent/1/while_do_outdented | 2:1 |
61
- | indent/1/while_do_content_indented | 3:5 |
62
- | indent/1/while_do_content_outdented | 3:3 |
63
- | indent/1/until_do_indented | 4:1 |
64
- | indent/1/for_do_indented | 1:1 |
65
- | indent/1/loop_do_indented | 1:1 |
66
-
67
- @multi_line @strings
68
- Scenarios: 1 problem with multi-line string
69
- | File | Position |
70
- | indent/1/multi_line_string_first_line_indented | 2:3 |
71
- | indent/1/multi_line_string_first_line_indented_trailing_comment | 2:3 |
72
- | indent/1/multi_line_tstring | 2:0 |
73
-
74
- @multi_line
75
- Scenarios: 1 problem with multi-line operator use
76
- | File | Position |
77
- | indent/1/multi_line_andop_first_line_indented | 2:3 |
78
- | indent/1/multi_line_andop_first_line_indented_trailing_comment | 2:3 |
79
- | indent/1/multi_line_andop_second_line_indented | 3:5 |
80
- | indent/1/multi_line_string_concat_with_plus_out | 2:1 |
81
-
82
- @multi_line
83
- Scenarios: 1 problem with multi-line method ending with period
84
- | File | Position |
85
- | indent/1/multi_line_method_call_end_in | 5:3 |
86
- | indent/1/multi_line_method_call_ends_with_period_2nd_line_in | 4:5 |
87
- | indent/1/multi_line_method_call_ends_with_many_periods_last_in | 3:4 |
88
- | indent/1/multi_line_method_call_ends_with_many_periods_last_in_trailing_comment | 3:4 |
89
-
90
-
91
-
@@ -1,219 +0,0 @@
1
- @indentation
2
- Feature: Indentation check on good files without trailing newlines
3
-
4
- Background:
5
- Given my configuration file ".tailor" looks like:
6
- """
7
- Tailor.config do |config|
8
- config.file_set do |style|
9
- style.trailing_newlines 0
10
- end
11
- end
12
- """
13
-
14
- @good_files
15
- Scenario Outline: Don't detect problems on properly indented files with no newlines at the end
16
- Given <File> exists without a newline at the end
17
- When I successfully run `tailor -d -c .tailor <File>`
18
- Then the output should match /Total Problems.*0/
19
- And the exit status should be 0
20
-
21
- Scenarios: Good class uses
22
- | File |
23
- | indent/ok/class |
24
- | indent/ok/nested_class |
25
- | indent/ok/class_empty |
26
- | indent/ok/class_empty_trailing_comment |
27
- | indent/ok/one_line_class |
28
- | indent/ok/one_line_subclass |
29
- | indent/ok/one_line_subclass_with_inheritance |
30
-
31
- @single_line
32
- Scenarios: Good single-line statement uses
33
- | File |
34
- | indent/ok/class_singlestatement |
35
- | indent/ok/require_class_singlestatement |
36
- | indent/ok/class_as_symbol |
37
-
38
- @multi_line
39
- Scenarios: Good multi-line statement uses
40
- | File |
41
- | indent/ok/assignment_addition_multistatement |
42
- | indent/ok/assignment_addition_multistatement_trailing_comment |
43
- | indent/ok/assignment_hash_multistatement |
44
- | indent/ok/assignment_hash_multistatement_trailing_comment |
45
- | indent/ok/assignment_array_multistatement |
46
- | indent/ok/assignment_array_multistatement_trailing_comment |
47
- | indent/ok/assignment_paren_multistatement |
48
- | indent/ok/assignment_paren_multistatement_trailing_comment |
49
- | indent/ok/assignment_twolevel_hash_multistatement |
50
- | indent/ok/assignment_twolevel_array_multistatement |
51
- | indent/ok/assignment_twolevel_paren_multistatement |
52
- | indent/ok/method_call_multistatement |
53
- | indent/ok/method_call_multistatement_trailing_comment |
54
- | indent/ok/method_call_multistatement_lonely_paren |
55
- | indent/ok/method_call_multistatement_lonely_paren_trailing_comment |
56
- | indent/ok/keyword_ending_with_period |
57
- | indent/ok/keyword_ending_with_period_trailing_comment |
58
-
59
- @multi_line @continuation
60
- Scenarios: Good use of continuation keywords
61
- | File |
62
- | indent/ok/rescue_ending_with_comma |
63
- | indent/ok/rescue_ending_with_comma_trailing_comment |
64
- | indent/ok/def_rescue |
65
-
66
- Scenarios: Good def uses
67
- | File |
68
- | indent/ok/def |
69
- | indent/ok/def_empty |
70
- | indent/ok/nested_def |
71
- | indent/ok/require_class_singlestatement_def |
72
- | indent/ok/require_class_singlestatement_def_content |
73
-
74
- @single_line
75
- Scenarios: Good single-line modifiers
76
- | File |
77
- | indent/ok/if_modifier |
78
- | indent/ok/if_modifier2 |
79
- | indent/ok/def_return_if_modifier |
80
- | indent/ok/unless_modifier |
81
- | indent/ok/def_return_unless_modifier |
82
- | indent/ok/while_within_single_line_block |
83
-
84
- @multi_line
85
- Scenarios: Good multi-line modifiers
86
- | File |
87
- | indent/ok/multi_line_if_with_trailing_andop |
88
-
89
- @case
90
- Scenarios: Good case statements
91
- | File |
92
- | indent/ok/case_whens_level |
93
- | indent/ok/case_strings_in_strings |
94
-
95
- Scenarios: Good 'do' loops
96
- | File |
97
- | indent/ok/while_do_loop |
98
- | indent/ok/while_do_loop2 |
99
- | indent/ok/until_do_loop |
100
- | indent/ok/until_do_loop2 |
101
- | indent/ok/for_do_loop |
102
- | indent/ok/loop_do_loop |
103
-
104
- Scenarios: Good non-'do' loops
105
- | File |
106
- | indent/ok/while_as_modifier_loop |
107
- | indent/ok/until_as_modifier_loop |
108
- | indent/ok/for_with_break_loop |
109
- | indent/ok/for_with_next_loop |
110
- | indent/ok/for_with_redo_loop |
111
- | indent/ok/for_with_retry_loop |
112
- | indent/ok/loop_with_braces |
113
-
114
- @single_line @braces
115
- Scenarios: Good single-line brace uses
116
- | File |
117
- | indent/ok/single_line_braces |
118
- | indent/ok/single_line_braces_as_t_string |
119
-
120
- @multi_line @braces
121
- Scenarios: Good multi-line brace uses
122
- | File |
123
- | indent/ok/multi_line_braces |
124
- | indent/ok/multi_line_braces_as_t_string |
125
- | indent/ok/multi_line_lonely_braces |
126
- | indent/ok/multi_line_lonely_braces_as_t_string |
127
- | indent/ok/multi_line_braces_embedded_arrays |
128
- | indent/ok/braces_combo |
129
- | indent/ok/deep_hash_with_rockets |
130
-
131
- @single_line @brackets
132
- Scenarios: Good single-line bracket uses
133
- | File |
134
- | indent/ok/single_line_brackets |
135
- | indent/ok/single_line_brackets_as_t_string |
136
-
137
- @multi_line @brackets
138
- Scenarios: Good multi-line bracket uses
139
- | File |
140
- | indent/ok/multi_line_brackets |
141
- | indent/ok/multi_line_brackets_as_t_string |
142
- | indent/ok/multi_line_lonely_brackets |
143
- | indent/ok/multi_line_lonely_brackets_as_t_string |
144
- | indent/ok/multi_line_brackets_embedded_hashes |
145
- | indent/ok/brackets_combo |
146
-
147
- @single_line @parens
148
- Scenarios: Good single-line paren uses
149
- | File |
150
- | indent/ok/single_line_parens |
151
- | indent/ok/single_line_parens_as_t_string |
152
-
153
- @multi_line @parens
154
- Scenarios: Good multi-line paren uses
155
- | File |
156
- | indent/ok/multi_line_parens |
157
- | indent/ok/multi_line_parens_as_t_string |
158
- | indent/ok/multi_line_lonely_parens |
159
- | indent/ok/multi_line_lonely_parens_with_commas |
160
- | indent/ok/multi_line_lonely_parens_as_t_string |
161
- | indent/ok/parens_combo |
162
-
163
- @multi_line @ops
164
- Scenarios: Good multi-line operator uses
165
- | File |
166
- | indent/ok/multi_line_ops |
167
- | indent/ok/multi_line_andop_in_method |
168
- | indent/ok/multi_line_rshift_in_method |
169
- | indent/ok/multi_line_string_concat_with_plus |
170
- | indent/ok/multi_line_string_concat_with_plus_in_parens |
171
- | indent/ok/multi_line_string_concat_twice |
172
-
173
- @multi_line
174
- Scenarios: Good multi-line method calls
175
- | File |
176
- | indent/ok/multi_line_method_call |
177
- | indent/ok/multi_line_method_call_ends_with_period |
178
- | indent/ok/multi_line_method_call_ends_with_many_periods |
179
- | indent/ok/method_lonely_args |
180
-
181
- @multi_line @ops
182
- Scenarios: Good multi-line if + logical operators
183
- | File |
184
- | indent/ok/multi_line_if_logical_and |
185
-
186
- @multi_line @blocks
187
- Scenarios: Good multi-line blocks
188
- | File |
189
- | indent/ok/multi_line_each_block |
190
- | indent/ok/multi_line_each_block_with_op_and_parens |
191
- | indent/ok/do_end_block_in_parens |
192
- | indent/ok/block_in_block_ends_on_same_line |
193
-
194
- @single_line @keywords
195
- Scenarios: Good use of single-line keyword statements
196
- | File |
197
- | indent/ok/single_line_begin_rescue_end |
198
-
199
- @multi_line @combos
200
- Scenarios: Good combinations of many things
201
- | File |
202
- | indent/ok/combo1 |
203
- | indent/ok/combo2 |
204
- | indent/ok/combo3 |
205
- | indent/ok/brace_bracket_paren_combo1 |
206
- | indent/ok/paren_comma_combo1 |
207
-
208
- @multi_line @labels
209
- Scenarios: Use of labels
210
- | File |
211
- | indent/ok/line_ends_with_label |
212
-
213
- @wip
214
- Scenarios: WIPs
215
- | File |
216
- | indent/ok/case_whens_in |
217
- | indent/ok/method_closing_lonely_paren |
218
- | indent/ok/rparen_and_do_same_line |
219
-