Apparently N is alphabetically before c; downcase the comparison

This commit is contained in:
Issy Long 2023-12-21 01:25:18 +00:00
parent 8cf58e36e6
commit 73b3ace77c
No known key found for this signature in database
GPG Key ID: 8247C390DADC67D4

View File

@ -19,7 +19,7 @@ module RuboCop
end
array.each_descendant(:str).each_cons(2) do |first, second|
next if first.source < second.source
next if first.source.downcase < second.source.downcase
add_offense(second, message: "The `zap trash` paths should be in alphabetical order") do |corrector|
corrector.insert_before(first.source_range, second.source)