Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rubocop offenses 1021 003 #1107

Merged
merged 3 commits into from
Apr 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -752,13 +752,6 @@ Style/OpMethod:
Style/ParallelAssignment:
Enabled: false

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: AllowSafeAssignment.
Style/ParenthesesAroundCondition:
Exclude:
- 'lib/cucumber/multiline_argument/data_table.rb'

# Offense count: 225
# Cop supports --auto-correct.
# Configuration parameters: PreferredDelimiters.
Expand Down Expand Up @@ -986,13 +979,6 @@ Style/SpaceBeforeComma:
Exclude:
- 'lib/cucumber/term/ansicolor.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: AllowForAlignment.
Style/SpaceBeforeFirstArg:
Exclude:
- 'spec/cucumber/rb_support/rb_step_definition_spec.rb'

# Offense count: 255
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
Expand Down Expand Up @@ -1077,18 +1063,6 @@ Style/SymbolProc:
Style/TrailingBlankLines:
Enabled: false

# Offense count: 43
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyleForMultiline, SupportedStyles.
# SupportedStyles: comma, consistent_comma, no_comma
Style/TrailingCommaInLiteral:
Exclude:
- 'lib/cucumber/cli/options.rb'
- 'lib/cucumber/term/ansicolor.rb'
- 'spec/cucumber/file_specs_spec.rb'
- 'spec/cucumber/filters/tag_limits/verifier_spec.rb'
- 'spec/cucumber/formatter/legacy_api/adapter_spec.rb'

# Offense count: 18
# Cop supports --auto-correct.
# Reviewed: in pretty_spec.rb, progress_spec.rb offences look false,
Expand Down
2 changes: 1 addition & 1 deletion lib/cucumber/cli/options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ def banner
'cucumber examples/i18n/en/features',
'cucumber @rerun.txt (See --format rerun)',
'cucumber examples/i18n/it/features/somma.feature:6:98:113',
'cucumber -s -i http://rubyurl.com/eeCl', '', '',
'cucumber -s -i http://rubyurl.com/eeCl', '', ''
].join("\n")
end

Expand Down
2 changes: 1 addition & 1 deletion lib/cucumber/multiline_argument/data_table.rb
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ def pad_and_match(a_cell_matrix, other_cell_matrix) #:nodoc:

header_values.each_with_index do |v, i|
mapped_index = unmatched_cols.index{|unmapped_col| unmapped_col.first == v}
if (mapped_index)
if mapped_index
matched_cols << unmatched_cols.delete_at(mapped_index)
else
mark_as_missing(cols[i])
Expand Down
2 changes: 1 addition & 1 deletion lib/cucumber/term/ansicolor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module ANSIColor
[ :on_blue , 44 ],
[ :on_magenta , 45 ],
[ :on_cyan , 46 ],
[ :on_white , 47 ],
[ :on_white , 47 ]
]

ATTRIBUTE_NAMES = ATTRIBUTES.transpose.first
Expand Down
8 changes: 4 additions & 4 deletions spec/cucumber/file_specs_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ module Cucumber
Cucumber::Core::Ast::Location.new('features/foo.feature', 3),
Cucumber::Core::Ast::Location.new('features/bar.feature', 4),
Cucumber::Core::Ast::Location.new('features/bar.feature', 5),
Cucumber::Core::Ast::Location.new('features/bar.feature', 6),
Cucumber::Core::Ast::Location.new('features/bar.feature', 6)
]
end

it 'parses file names from multiple file specs' do
expect(files.length).to eq 2
expect(files).to eq [
'features/foo.feature',
'features/bar.feature',
'features/bar.feature'
]
end

Expand All @@ -42,7 +42,7 @@ module Cucumber
it 'returns a wildcard location for that file' do
expect(locations).to eq [
Cucumber::Core::Ast::Location.new('features/foo.feature'),
Cucumber::Core::Ast::Location.new('features/bar.feature', 34),
Cucumber::Core::Ast::Location.new('features/bar.feature', 34)
]
end
end
Expand All @@ -53,7 +53,7 @@ module Cucumber
it 'returns locations in the order specified' do
expect(locations).to eq [
Cucumber::Core::Ast::Location.new('features/foo.feature', 10),
Cucumber::Core::Ast::Location.new('features/foo.feature', 1),
Cucumber::Core::Ast::Location.new('features/foo.feature', 1)
]
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/cucumber/filters/tag_limits/verifier_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
let(:locations) do
[
double(:location, to_s: 'path/to/some.feature:3'),
double(:location, to_s: 'path/to/some/other.feature:8'),
double(:location, to_s: 'path/to/some/other.feature:8')
]
end

Expand Down
Loading