fix dangling enclosed comma
This commit is contained in:
parent
a175d6b7a1
commit
ab6a4d757a
@ -532,6 +532,7 @@ module RuboCop
|
|||||||
@offensive_node.source.sub(/shells: \[(:bash|:zsh|:fish)\]/, "")
|
@offensive_node.source.sub(/shells: \[(:bash|:zsh|:fish)\]/, "")
|
||||||
.sub(", )", ")") # clean up dangling trailing comma
|
.sub(", )", ")") # clean up dangling trailing comma
|
||||||
.sub("(, ", "(") # clean up dangling leading comma
|
.sub("(, ", "(") # clean up dangling leading comma
|
||||||
|
.sub(", , ", ", ") # clean up dangling enclosed comma
|
||||||
else
|
else
|
||||||
@offensive_node.source.sub(/shells: \[(:bash|:zsh|:fish)\]/,
|
@offensive_node.source.sub(/shells: \[(:bash|:zsh|:fish)\]/,
|
||||||
"shells: [#{shells.join(", ")}]")
|
"shells: [#{shells.join(", ")}]")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user