[英]How to use only few cops from rubocop-rspec?
I would like to use only a few cops from the gem rubocop-rspec.我只想使用 gem rubocop-rspec 中的几个警察。
I've tried this way, but it doesn't work:我试过这种方式,但它不起作用:
require:
- rubocop-rspec
RSpec:
Enabled: false
RSpec/ExampleWithoutDescription:
Enabled: true
I've also tried this:我也试过这个:
require:
- rubocop-rspec
AllCops:
RSpec:
Enabled: false
RSpec/ExampleWithoutDescription:
Enabled: true
You can disable all cops by default - as per the documentation :您可以默认禁用所有警察 - 根据文档:
AllCops:
DisabledByDefault: true
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.