【发布时间】:2020-09-30 21:19:18
【问题描述】:
运行 Rubocop 后:
bundle exec rubocop
我得到这个输出:
Inspecting 3 files
C..
Offenses:
lib/main.rb:145:3: C: Use SCREAMING_SNAKE_CASE for constants.
InternalCache = if RUBY_ENGINE == 'ruby'
^^^^^^^^^^^^^
3 files inspected, 1 offense detected
我的问题是:如果我选择忽略此攻击,我如何才能找到我必须禁用的规则的名称。
我要查找的名称是我将在 # rubocop:disable 评论中使用的名称:
# rubocop:disable Metrics/BlockLength
谢谢!
【问题讨论】: