That change would work.  I made my change to be consistent with other places in the code:

26:        file_path = match.shift.split(' -- ').first
75:          parts = line.split(" -- ")
80:            result = "#{section_break}\"#{parts[0]}\" -- #{warnings}\n"

But note that the spaces *are* required, at least one on each side.  The file name comes first in the output, and if the file name contains "--" it will match that first if spaces aren't included.  I hit this problem before I changed to " -- ".

My opinion is that this is tool output that is being parsed, so the spaces will always be there.