Sha256: 0cd907b2ed3d469d992d99bc2179b4cfe32ea3c0290d896caebdf399e8bfa8e0

Contents?: true

Size: 1.63 KB

Versions: 20

Compression:

Stored size: 1.63 KB

Contents

# Introducing Ramsey Cop to an existing repository

Here are a few tips for introducing RamseyCop to an existing project

* Delete any existing `.rubocop.yml` config files
* Run `rails generate ramsey_cop`
  * Or manually create a new `.rubocop.yml` that contains only

```yaml
inherit_gem:
  ramsey_cop:
    - default.yml
```

## Getting a feel for the current state of your code.
* Run `bundle exec rubocop -f o` to get a count of violations per cop.
* Run `bundle exec rubocop -f w` to see your worst offending files.
* Run `bundle exec rubocop -h` to see the other handy options.

## Letting rubocop fix what it can
Some of the cops are auto-correctable. This will make all of those changes. Generally it is not advised to make style-only changes, as your time is probably better spent adding some new feature. However, this only requires a review and may be worth the effort. If you're happy with the auto-correct changes, you could go ahead and commit that. If there are changes you are not happy with, then you can put in a PR for this gem to change the cops.

* Run `bundle exec rubocop --auto-correct`

## Your first PR after including RamseyCop
Hopefully you have CodeClimate running against your repo and blocking PRs when it sees offenses. This is good, and it means your first PR will be blocked for all of your offenses. You may want to get a repo admin to merge your PR anyway. This will allow you to then only focus on offenses as code is changed/added.

## Further notes
* Be sure to either use `bundle exec rubocop` OR run `bundle binstubs rubocop` before executing `rubocop` to make sure you are getting the version of `rubocop` specified in `RamseyCop`

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
ramsey_cop-0.24.0 documentation/existing-repositories.md
ramsey_cop-0.23.0 documentation/existing-repositories.md
ramsey_cop-0.22.0 documentation/existing-repositories.md
ramsey_cop-0.20.0 documentation/existing-repositories.md
ramsey_cop-0.19.0 documentation/existing-repositories.md
ramsey_cop-0.18.0 documentation/existing-repositories.md
ramsey_cop-0.16.0 documentation/existing-repositories.md
ramsey_cop-0.15.0 documentation/existing-repositories.md
ramsey_cop-0.14.2 documentation/existing-repositories.md
ramsey_cop-0.14.1 documentation/existing-repositories.md
ramsey_cop-0.14.0 documentation/existing-repositories.md
ramsey_cop-0.13.2 documentation/existing-repositories.md
ramsey_cop-0.13.1 documentation/existing-repositories.md
ramsey_cop-0.13.0 documentation/existing-repositories.md
ramsey_cop-0.12.0 documentation/existing-repositories.md
ramsey_cop-0.11.0 documentation/existing-repositories.md
ramsey_cop-0.10.0 documentation/existing-repositories.md
ramsey_cop-0.9.0 documentation/existing-repositories.md
ramsey_cop-0.8.0 documentation/existing-repositories.md
ramsey_cop-0.7.3 documentation/existing-repositories.md