English | 日本語

momocop

Spec Gem Version

Momocop is highly opinionated custom cops for RuboCop.

Installation

Add momocop to your Gemfile.

# Gemfile
gem 'momocop', require: false

Usage

Edit .rubocop.yml to require momocop and enable the cops you want.

All cops are disabled by default.

# .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

Cops

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

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/supermomonga/momocop. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Momocop project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.