Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

初心者が .rubocop.yml を簡単に作れるように rubocop --init が欲しい #34

Closed
sinsoku opened this issue Dec 9, 2017 · 1 comment

Comments

@sinsoku
Copy link
Collaborator

sinsoku commented Dec 9, 2017

初心者が .rubocop.yml を作成するのは下記の理由で難しいと思いました。

  • .rubocop.yml の話が rubocop --help や README に記載がない
  • デフォルト値がどうなっているのか分からない
  • 使えるオプションが分からない

設定値は GitHub 上の RuboCop のソースコードを見るしか(たぶん)知る方法がない。

提案

$ rubocop --init で基本的な yml を生成して上げて、基本的な設定項目を列挙して上げたら良いかなと思いました。
最近のRailsの routes.rb だと URL がコメントとして挿入されています。

# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html

GitHub 上の RuboCop の yml へのリンクを挿入してあげると、親切かもしれません。

@koic
Copy link
Member

koic commented Apr 14, 2019

まずは rubocop --initコンフィグレーションへのリンクを示す .rubocop.yml を生成するようにしました。
rubocop/rubocop#6928

基本的な設定項目として何を示すかといった選別が悩ましいため、上記 PR でこのイシューのすべての問題が解決するわけではないですが、これをベース別途検討という形でこのイシュー自体はクローズします。ナイスな提案ありがとうございました!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants