English | 日本語

momocop

Spec Gem Version

Momocopは、規約ベースのOpinionatedなRuboCopカスタムCopを提供します。

インストール

momocopをGemfileに追加してください。

# Gemfile
gem 'momocop', require: false

使用方法

.rubocop.ymlを編集して、momocopをrequireしてください。

すべてのCopはデフォルトで無効になっているため、利用したいCopを有効にしてください。

# .rubocop.yaml
require:
  - momocop

Momocop/FactoryBotClassExistence:
  Enabled: true
Momocop/FactoryBotConsistentFileName:
  Enabled: true
Momocop/FactoryBotInlineAssociation:
  Enabled: true
Momocop/FactoryBotMissingAssociations:
  Enabled: true
Momocop/FactoryBotMissingClassOption:
  Enabled: true
Momocop/FactoryBotMissingProperties:
  Enabled: true
Momocop/FactoryBotPropertyOrder:
  Enabled: true
Momocop/FactoryBotSingleDefinePerFile:
  Enabled: true
Momocop/FactoryBotSingleFactoryPerDefine:
  Enabled: true
Momocop/FactoryBotSingularFactoryName:
  Enabled: true
Momocop/Layout/LeadingCommentSpace:
  Enabled: true

Cop一覧

Cop Rails FactoryBot
Momocop/FactoryBotClassExistence :white_check_mark: :white_check_mark:
Momocop/FactoryBotConsistentFileName :white_check_mark: :white_check_mark:
Momocop/FactoryBotInlineAssociation :white_check_mark: :white_check_mark:
Momocop/FactoryBotMissingAssociations :white_check_mark: :white_check_mark:
Momocop/FactoryBotMissingClassOption :white_check_mark: :white_check_mark:
Momocop/FactoryBotMissingProperties :white_check_mark: :white_check_mark:
Momocop/FactoryBotPropertyOrder :white_check_mark: :white_check_mark:
Momocop/FactoryBotSingleDefinePerFile :white_check_mark: :white_check_mark:
Momocop/FactoryBotSingleFactoryPerDefine :white_check_mark: :white_check_mark:
Momocop/FactoryBotSingularFactoryName :white_check_mark: :white_check_mark:
Momocop/Layout/LeadingCommentSpace

貢献

GitHubの https://github.com/supermomonga/momocop でのバグ報告やプルリクエストは歓迎します。このプロジェクトは安全で、協力的な空間であることを目指しており、貢献者は行動規範に従うことが求められます。

ライセンス

このgemはMITライセンスの条件の下でオープンソースとして利用可能です。

行動規範

Momocopプロジェクトのコードベース、イシュートラッカー、チャットルーム、およびメーリングリストにおいて交流する全員は、行動規範に従うことが期待されます。