Low commit activity in last 3 years
No release in over a year
Replaypoker rubocop config.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 1.22.0
 Project Readme

Build Status

Rubocop::Replaypoker

Common Ruby style settings. This gem takes all the settings and version controls still giving to the developer the ability to make per project adjustments.

Installation

Add this line to your application's Gemfile:

gem 'rubocop-replaypoker', require: false

And then execute:

$ bundle install

Or install it yourself as:

$ gem install rubocop-replaypoker

Usage

This gem assume that it will be used in the project with the linter settings inheritance would be something like this:

  1. Rubocop gem defaults, link
  2. The settings from this gem, link
  3. The auto-gen-config (see in your project .rubocop_todo.yml)
    • This file is auto generated by rubocop with the command bundler exec rubocop --auto-gen-config and stub all the warnings from rubocop.
    • Keep this file empty in the master branch
  4. Project specific settings (see in your project .rubocop_local_overrides.yml)
    • rubocop gem have the variety of extra addons which might be added and require some extra settings or the project might require some adjustments against the already defined settings. All of it should be in here.

To apply this structure copy link to your project root.

Notes && gotchas

  • Rubocop gem have an awesome auto-correction feature. There are 2 modes: safe & ricky. To run safe option use bundle exec rubocop -a and for ricky use bundle exec rubocop -A.
  • Some rubocop cops depend on the settings from another cops (Layout/LineLength cop is a great example), so if you added some code which break this cop and there is no way to auto-correct it and then executed bundler exec rubocop auto-gen-config it produce the new cop Max setting and it would be applied all the dependencies. It might produce a lot of unwanted changes.
  • Because of the previous trait i recommend to git commit all your changes and run rubocop afterwards, and then apply the changes with something like git add . && git commit --amend --no-edit

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/replaypoker/rubocop-replaypoker. 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 Rubocop::Replaypoker project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.