LoginSignup
3
3

More than 5 years have passed since last update.

rubocopのdisableに設定するクラス名の一覧

Last updated at Posted at 2014-01-27

2014.09.12
下記のQiita記事のほうがより詳細ですので、そちらの参照をおススメします。
RuboCopの警告をコメントで無効化する方法

概要:rubocopでdisableに設定したいが、設定するクラス名がわからない
解決策:rubocop -Dまたはrubocop --display-cop-names

下記の例では2つのクラスが見える。

  • EmptyLines
  • LineLength
Inspecting 3 files
C..

Offences:

app.rb:10:1: C: EmptyLines: Extra blank line detected.
app.rb:11:91: C: LineLength: Line is too long. [97/90]
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                                                                                          ^^^^^^^

3 files inspected, 2 offences detected

ほか、rubocop -foまたはrubocop --format offencesだと下記の結果


1  LineLength
1  EmptyLines

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3