Rubocop changes #!/usr/bin/ruby to
# !/usr/bin/ruby
adds a space after the hash when I use rubocop -a, how can I avoid this
Rubocop changes #!/usr/bin/ruby to
# !/usr/bin/ruby
adds a space after the hash when I use rubocop -a, how can I avoid this
Copyright © 2021 Jogjafile Inc.
You'll have to disable the
LeadingCommentSpacecop. It ensures that there is a space between#and the text that follows it. Puts something like this in your.rubocop.yml:What you've stumbled upon is a bug, that I'll fix in the next RuboCop release (I'm its author). Obviously
#!should be treated specially.