Skip to content

Commit d231ec4

Browse files
committed
Partial AF: Layout/SpaceAroundOperators and Layout/Multiline cops
1 parent 40c8fab commit d231ec4

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

ruby/lib/cucumber/cucumber_expressions/cucumber_expression_generator.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ def create_parameter_type_matchers2(parameter_type, text)
8484

8585
def escape(s)
8686
s.gsub(/%/, '%%')
87-
.gsub(/\(/, '\\(')
88-
.gsub(/{/, '\\{')
89-
.gsub(/\//, '\\/')
87+
.gsub(/\(/, '\\(')
88+
.gsub(/{/, '\\{')
89+
.gsub(/\//, '\\/')
9090
end
9191
end
9292
end

ruby/lib/cucumber/cucumber_expressions/tree_regexp.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ def match(s)
2323

2424
private def is_non_capturing(source, i)
2525
# Regex is valid. Bounds check not required.
26-
if source[i+1] != '?'
26+
if source[i + 1] != '?'
2727
# (X)
2828
return false
2929
end
3030

31-
if source[i+2] != '<'
31+
if source[i + 2] != '<'
3232
# (?:X)
3333
# (?idmsuxU-idmsuxU)
3434
# (?idmsux-idmsux:X)
@@ -38,7 +38,7 @@ def match(s)
3838
return true
3939
end
4040

41-
if source[i+3] == '=' || source[i+3] == '!'
41+
if source[i + 3] == '=' || source[i + 3] == '!'
4242
# (?<=X)
4343
# (?<!X)
4444
return true

ruby/spec/cucumber/cucumber_expressions/parameter_type_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ module CucumberExpressions
1010
ParameterType.new('case-insensitive', /[a-z]+/i, String, ->(s) { s }, true, true)
1111
end.to raise_error(
1212
CucumberExpressionError,
13-
"ParameterType Regexps can't use option Regexp::IGNORECASE")
13+
"ParameterType Regexps can't use option Regexp::IGNORECASE"
14+
)
1415
end
1516
end
1617
end

0 commit comments

Comments
 (0)