rubocop 0.73.0 → 0.74.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/bin/console +1 -0
- data/config/default.yml +2 -1
- data/lib/rubocop.rb +3 -0
- data/lib/rubocop/ast/node.rb +1 -7
- data/lib/rubocop/config.rb +17 -537
- data/lib/rubocop/config_obsoletion.rb +201 -0
- data/lib/rubocop/config_validator.rb +239 -0
- data/lib/rubocop/cop/layout/extra_spacing.rb +14 -53
- data/lib/rubocop/cop/layout/indentation_width.rb +19 -5
- data/lib/rubocop/cop/layout/space_around_operators.rb +42 -23
- data/lib/rubocop/cop/layout/space_inside_string_interpolation.rb +22 -40
- data/lib/rubocop/cop/lint/debugger.rb +0 -2
- data/lib/rubocop/cop/lint/empty_interpolation.rb +4 -4
- data/lib/rubocop/cop/lint/erb_new_arguments.rb +56 -0
- data/lib/rubocop/cop/lint/literal_in_interpolation.rb +7 -8
- data/lib/rubocop/cop/lint/string_conversion_in_interpolation.rb +6 -6
- data/lib/rubocop/cop/lint/unneeded_splat_expansion.rb +6 -1
- data/lib/rubocop/cop/metrics/line_length.rb +6 -0
- data/lib/rubocop/cop/mixin/documentation_comment.rb +0 -2
- data/lib/rubocop/cop/mixin/interpolation.rb +27 -0
- data/lib/rubocop/cop/mixin/preceding_following_alignment.rb +87 -0
- data/lib/rubocop/cop/mixin/surrounding_space.rb +7 -5
- data/lib/rubocop/cop/style/commented_keyword.rb +8 -28
- data/lib/rubocop/cop/style/conditional_assignment.rb +1 -3
- data/lib/rubocop/cop/style/constant_visibility.rb +13 -2
- data/lib/rubocop/cop/style/guard_clause.rb +39 -10
- data/lib/rubocop/cop/style/lambda.rb +0 -2
- data/lib/rubocop/cop/style/trailing_method_end_statement.rb +4 -6
- data/lib/rubocop/cop/style/variable_interpolation.rb +6 -16
- data/lib/rubocop/path_util.rb +1 -1
- data/lib/rubocop/processed_source.rb +4 -0
- data/lib/rubocop/rspec/expect_offense.rb +4 -1
- data/lib/rubocop/version.rb +1 -1
- metadata +5 -2
@@ -132,7 +132,10 @@ module RuboCop
|
|
132
132
|
def expect_no_offenses(source, file = nil)
|
133
133
|
inspect_source(source, file)
|
134
134
|
|
135
|
-
|
135
|
+
expected_annotations = AnnotatedSource.parse(source)
|
136
|
+
actual_annotations =
|
137
|
+
expected_annotations.with_offense_annotations(cop.offenses)
|
138
|
+
expect(actual_annotations.to_s).to eq(source)
|
136
139
|
end
|
137
140
|
|
138
141
|
# Parsed representation of code annotated with the `^^^ Message` style
|
data/lib/rubocop/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.74.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bozhidar Batsov
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2019-07-
|
13
|
+
date: 2019-07-31 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: jaro_winkler
|
@@ -202,7 +202,9 @@ files:
|
|
202
202
|
- lib/rubocop/config.rb
|
203
203
|
- lib/rubocop/config_loader.rb
|
204
204
|
- lib/rubocop/config_loader_resolver.rb
|
205
|
+
- lib/rubocop/config_obsoletion.rb
|
205
206
|
- lib/rubocop/config_store.rb
|
207
|
+
- lib/rubocop/config_validator.rb
|
206
208
|
- lib/rubocop/cop/autocorrect_logic.rb
|
207
209
|
- lib/rubocop/cop/badge.rb
|
208
210
|
- lib/rubocop/cop/bundler/duplicated_gem.rb
|
@@ -450,6 +452,7 @@ files:
|
|
450
452
|
- lib/rubocop/cop/mixin/ignored_methods.rb
|
451
453
|
- lib/rubocop/cop/mixin/ignored_pattern.rb
|
452
454
|
- lib/rubocop/cop/mixin/integer_node.rb
|
455
|
+
- lib/rubocop/cop/mixin/interpolation.rb
|
453
456
|
- lib/rubocop/cop/mixin/match_range.rb
|
454
457
|
- lib/rubocop/cop/mixin/method_complexity.rb
|
455
458
|
- lib/rubocop/cop/mixin/method_preference.rb
|