【发布时间】:2018-09-25 07:41:59
【问题描述】:
使用 Rubocop,我可以覆盖 .rubocop.yml 文件中的规则,例如 this:
AllCops:
RunRailsCops: true
# Commonly used screens these days easily fit more than 80 characters.
Metrics/LineLength:
Max: 120
# Too short methods lead to extraction of single-use methods, which can make
# the code easier to read (by naming things), but can also clutter the class
Metrics/MethodLength:
Max: 20
我相信 CodeSniffer 支持这样的东西,但是查看他们的 wiki 页面,我找不到任何关于规则的信息:
而且默认配置文件似乎不支持它:
【问题讨论】:
标签: codesniffer