运行

2016-07-11 23 views
0

时如何配置Rubocop显示规则好像,而不是超级有用的进攻/关注/警告语法时才想:运行

C: Use delete instead of gsub. 

这可能显示:

C: Use delete instead of gsub. Cop name: [Whatever it's upset about] 

所以你如果不用另一个小时搜索不可用的资料,就可以禁用该功能。

我已经使用了一段时间了,并且还没有找到这个出色的linter产生的4,200个问题的答案。

回答

-1
be rubocop --dedbug 

那种它...你可以在那里以及

be rubocop app/models/ihaterubocop.rb --dedbug 
+0

这将是不调试dedbug。你的问题是如何解决进攻或如何关闭警告? – nikkypx

2

折腾了文件名称显示在输出中警察的名字,你可以使用--display-cop-names,或-D短。

实施例:

$ bundle exec rubocop -D tmp.rb 
Inspecting 1 file 
C 

Offenses: 

tmp.rb:1:6: C: Style/MethodCallParentheses: Do not use parentheses for method calls with no arguments. 
hello() 
    ^