rubocop 0.14.0 → 0.14.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rubocop might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +15 -0
- data/README.md +1 -1
- data/config/default.yml +4 -0
- data/config/enabled.yml +16 -8
- data/lib/rubocop.rb +3 -0
- data/lib/rubocop/cli.rb +1 -1
- data/lib/rubocop/config.rb +3 -160
- data/lib/rubocop/config_loader.rb +156 -0
- data/lib/rubocop/config_store.rb +6 -6
- data/lib/rubocop/cop/style/align_hash.rb +15 -11
- data/lib/rubocop/cop/style/braces_around_hash_parameters.rb +46 -0
- data/lib/rubocop/cop/style/class_length.rb +27 -4
- data/lib/rubocop/cop/style/documentation.rb +23 -25
- data/lib/rubocop/cop/style/raise_args.rb +6 -1
- data/lib/rubocop/cop/style/space_after_not.rb +37 -0
- data/lib/rubocop/cop/util.rb +18 -1
- data/lib/rubocop/formatter/clang_style_formatter.rb +11 -2
- data/lib/rubocop/options.rb +3 -3
- data/lib/rubocop/version.rb +1 -1
- data/spec/project_spec.rb +2 -2
- data/spec/rubocop/cli_spec.rb +1 -1
- data/spec/rubocop/config_loader_spec.rb +314 -0
- data/spec/rubocop/config_spec.rb +1 -308
- data/spec/rubocop/config_store_spec.rb +9 -9
- data/spec/rubocop/cop/lint/shadowing_outer_local_variable_spec.rb +1 -1
- data/spec/rubocop/cop/lint/useless_assignment_spec.rb +3 -3
- data/spec/rubocop/cop/style/align_hash_spec.rb +17 -20
- data/spec/rubocop/cop/style/braces_around_hash_parameters_spec.rb +193 -0
- data/spec/rubocop/cop/style/class_length_spec.rb +64 -0
- data/spec/rubocop/cop/style/documentation_spec.rb +10 -0
- data/spec/rubocop/cop/style/indentation_width_spec.rb +0 -7
- data/spec/rubocop/cop/style/numeric_literals_spec.rb +1 -1
- data/spec/rubocop/cop/style/raise_args_spec.rb +5 -0
- data/spec/rubocop/cop/style/space_after_not_spec.rb +22 -0
- data/spec/rubocop/cop/team_spec.rb +1 -1
- data/spec/rubocop/cop/util_spec.rb +49 -0
- data/spec/rubocop/formatter/clang_style_formatter_spec.rb +42 -16
- data/spec/rubocop/options_spec.rb +3 -2
- data/spec/spec_helper.rb +1 -1
- metadata +13 -2
@@ -116,8 +116,9 @@ Usage: rubocop [options] [file1, file2, ...]
|
|
116
116
|
let(:cops) { Rubocop::Cop::Cop.all }
|
117
117
|
|
118
118
|
let(:global_conf) do
|
119
|
-
config_path =
|
120
|
-
|
119
|
+
config_path =
|
120
|
+
Rubocop::ConfigLoader.configuration_file_for(Dir.pwd.to_s)
|
121
|
+
Rubocop::ConfigLoader.configuration_from_file(config_path)
|
121
122
|
end
|
122
123
|
|
123
124
|
let(:stdout) { $stdout.string }
|
data/spec/spec_helper.rb
CHANGED
@@ -81,6 +81,7 @@ end
|
|
81
81
|
|
82
82
|
def inspect_source(cop, source)
|
83
83
|
processed_source = parse_source(source)
|
84
|
+
fail 'Error parsing example code' unless processed_source.valid_syntax?
|
84
85
|
_investigate(cop, processed_source)
|
85
86
|
end
|
86
87
|
|
@@ -92,7 +93,6 @@ end
|
|
92
93
|
def autocorrect_source(cop, source)
|
93
94
|
cop.instance_variable_get(:@options)[:autocorrect] = true
|
94
95
|
processed_source = parse_source(source)
|
95
|
-
|
96
96
|
_investigate(cop, processed_source)
|
97
97
|
|
98
98
|
corrector =
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.14.
|
4
|
+
version: 0.14.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bozhidar Batsov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rainbow
|
@@ -151,6 +151,7 @@ files:
|
|
151
151
|
- lib/rubocop.rb
|
152
152
|
- lib/rubocop/cli.rb
|
153
153
|
- lib/rubocop/config.rb
|
154
|
+
- lib/rubocop/config_loader.rb
|
154
155
|
- lib/rubocop/config_store.rb
|
155
156
|
- lib/rubocop/cop/commissioner.rb
|
156
157
|
- lib/rubocop/cop/cop.rb
|
@@ -193,6 +194,7 @@ files:
|
|
193
194
|
- lib/rubocop/cop/style/block_comments.rb
|
194
195
|
- lib/rubocop/cop/style/block_nesting.rb
|
195
196
|
- lib/rubocop/cop/style/blocks.rb
|
197
|
+
- lib/rubocop/cop/style/braces_around_hash_parameters.rb
|
196
198
|
- lib/rubocop/cop/style/case_equality.rb
|
197
199
|
- lib/rubocop/cop/style/case_indentation.rb
|
198
200
|
- lib/rubocop/cop/style/character_literal.rb
|
@@ -261,6 +263,7 @@ files:
|
|
261
263
|
- lib/rubocop/cop/style/space_after_comma_etc.rb
|
262
264
|
- lib/rubocop/cop/style/space_after_control_keyword.rb
|
263
265
|
- lib/rubocop/cop/style/space_after_method_name.rb
|
266
|
+
- lib/rubocop/cop/style/space_after_not.rb
|
264
267
|
- lib/rubocop/cop/style/space_before_modifier_keyword.rb
|
265
268
|
- lib/rubocop/cop/style/special_global_vars.rb
|
266
269
|
- lib/rubocop/cop/style/string_help.rb
|
@@ -309,6 +312,7 @@ files:
|
|
309
312
|
- spec/.rubocop.yml
|
310
313
|
- spec/project_spec.rb
|
311
314
|
- spec/rubocop/cli_spec.rb
|
315
|
+
- spec/rubocop/config_loader_spec.rb
|
312
316
|
- spec/rubocop/config_spec.rb
|
313
317
|
- spec/rubocop/config_store_spec.rb
|
314
318
|
- spec/rubocop/cop/commissioner_spec.rb
|
@@ -351,6 +355,7 @@ files:
|
|
351
355
|
- spec/rubocop/cop/style/block_comments_spec.rb
|
352
356
|
- spec/rubocop/cop/style/block_nesting_spec.rb
|
353
357
|
- spec/rubocop/cop/style/blocks_spec.rb
|
358
|
+
- spec/rubocop/cop/style/braces_around_hash_parameters_spec.rb
|
354
359
|
- spec/rubocop/cop/style/case_equality_spec.rb
|
355
360
|
- spec/rubocop/cop/style/case_indentation_spec.rb
|
356
361
|
- spec/rubocop/cop/style/character_literal_spec.rb
|
@@ -420,6 +425,7 @@ files:
|
|
420
425
|
- spec/rubocop/cop/style/space_after_comma_spec.rb
|
421
426
|
- spec/rubocop/cop/style/space_after_control_keyword_spec.rb
|
422
427
|
- spec/rubocop/cop/style/space_after_method_name_spec.rb
|
428
|
+
- spec/rubocop/cop/style/space_after_not_spec.rb
|
423
429
|
- spec/rubocop/cop/style/space_after_semicolon_spec.rb
|
424
430
|
- spec/rubocop/cop/style/space_around_block_braces_spec.rb
|
425
431
|
- spec/rubocop/cop/style/space_around_equals_in_default_parameter_spec.rb
|
@@ -444,6 +450,7 @@ files:
|
|
444
450
|
- spec/rubocop/cop/style/while_until_do_spec.rb
|
445
451
|
- spec/rubocop/cop/style/word_array_spec.rb
|
446
452
|
- spec/rubocop/cop/team_spec.rb
|
453
|
+
- spec/rubocop/cop/util_spec.rb
|
447
454
|
- spec/rubocop/cop/variable_inspector/assignment_spec.rb
|
448
455
|
- spec/rubocop/cop/variable_inspector/locatable_spec.rb
|
449
456
|
- spec/rubocop/cop/variable_inspector/scope_spec.rb
|
@@ -500,6 +507,7 @@ test_files:
|
|
500
507
|
- spec/.rubocop.yml
|
501
508
|
- spec/project_spec.rb
|
502
509
|
- spec/rubocop/cli_spec.rb
|
510
|
+
- spec/rubocop/config_loader_spec.rb
|
503
511
|
- spec/rubocop/config_spec.rb
|
504
512
|
- spec/rubocop/config_store_spec.rb
|
505
513
|
- spec/rubocop/cop/commissioner_spec.rb
|
@@ -542,6 +550,7 @@ test_files:
|
|
542
550
|
- spec/rubocop/cop/style/block_comments_spec.rb
|
543
551
|
- spec/rubocop/cop/style/block_nesting_spec.rb
|
544
552
|
- spec/rubocop/cop/style/blocks_spec.rb
|
553
|
+
- spec/rubocop/cop/style/braces_around_hash_parameters_spec.rb
|
545
554
|
- spec/rubocop/cop/style/case_equality_spec.rb
|
546
555
|
- spec/rubocop/cop/style/case_indentation_spec.rb
|
547
556
|
- spec/rubocop/cop/style/character_literal_spec.rb
|
@@ -611,6 +620,7 @@ test_files:
|
|
611
620
|
- spec/rubocop/cop/style/space_after_comma_spec.rb
|
612
621
|
- spec/rubocop/cop/style/space_after_control_keyword_spec.rb
|
613
622
|
- spec/rubocop/cop/style/space_after_method_name_spec.rb
|
623
|
+
- spec/rubocop/cop/style/space_after_not_spec.rb
|
614
624
|
- spec/rubocop/cop/style/space_after_semicolon_spec.rb
|
615
625
|
- spec/rubocop/cop/style/space_around_block_braces_spec.rb
|
616
626
|
- spec/rubocop/cop/style/space_around_equals_in_default_parameter_spec.rb
|
@@ -635,6 +645,7 @@ test_files:
|
|
635
645
|
- spec/rubocop/cop/style/while_until_do_spec.rb
|
636
646
|
- spec/rubocop/cop/style/word_array_spec.rb
|
637
647
|
- spec/rubocop/cop/team_spec.rb
|
648
|
+
- spec/rubocop/cop/util_spec.rb
|
638
649
|
- spec/rubocop/cop/variable_inspector/assignment_spec.rb
|
639
650
|
- spec/rubocop/cop/variable_inspector/locatable_spec.rb
|
640
651
|
- spec/rubocop/cop/variable_inspector/scope_spec.rb
|