Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Rubocop 更改#!/usr/bin/ruby为
#!/usr/bin/ruby
# !/usr/bin/ruby
使用时在哈希后添加一个空格rubocop -a,如何避免这种情况
rubocop -a
你必须禁用LeadingCommentSpace警察。它确保在它后面#的文本之间有一个空格。把这样的东西放在你的.rubocop.yml:
LeadingCommentSpace
#
.rubocop.yml
LeadingCommentSpace: enabled: false
您偶然发现的是一个错误,我将在下一个 RuboCop 版本中修复它(我是它的作者)。显然#!应该特殊对待。
#!