Skip to content

Commit

Permalink
Delete legacy config
Browse files Browse the repository at this point in the history
Maintaining a separate "edge" config and "legacy" config probably served
us well [back around the time we were migrating to rubocop
0.68](github@d533765),
but it's not working well for us anymore. Things changed often before
rubocop 1.0, and there are versions out there that don't work perfectly
with either of these configs (see
github#86, for example).

This commit sets a version constraint for rubocop ">= 1.0.0" and deletes
the `*_deprecated.yml` files that only worked with rubocop <
0.68. With the deprecated files deleted, it also consolidates the
remaining files into default.yml and rails.yml.
  • Loading branch information
composerinteralia committed Jun 24, 2022
1 parent a791e78 commit 695169d
Show file tree
Hide file tree
Showing 11 changed files with 469 additions and 505 deletions.
4 changes: 2 additions & 2 deletions Gemfile.lock
Expand Up @@ -2,7 +2,7 @@ PATH
remote: .
specs:
rubocop-github (0.17.0)
rubocop
rubocop (>= 1.0.0)
rubocop-performance
rubocop-rails

Expand Down Expand Up @@ -48,7 +48,7 @@ GEM
rake (13.0.6)
regexp_parser (2.2.0)
rexml (3.2.5)
rubocop (1.25.0)
rubocop (1.25.1)
parallel (~> 1.10)
parser (>= 3.1.0.0)
rainbow (>= 2.2.2, < 4.0)
Expand Down
27 changes: 5 additions & 22 deletions README.md
Expand Up @@ -4,28 +4,6 @@ This repository provides recommended RuboCop configuration and additional Cops f

## Usage

Rubocop 0.68 removed performance cops and 0.72 removed Rails cops. However, upgrading `rubocop-github` without modification will almost definitely create very many new offenses. The current version of this gem exposes the "legacy" configuration under `config/default.yml` and `config/rails.yml` which should be used *if and only if* the version of rubocop is locked to `< 0.68` in your project (which it should be unless you `bundle update rubocop`). It also exposes an "edge" configuration under `config/default_edge.yml` and `config/rails_edge.yml` so that the changes can be tested without introducing breaking changes.

### Legacy usage

**Gemfile**

``` ruby
gem "rubocop", "< 0.68"
gem "rubocop-github"
```

**.rubocop.yml**

``` yaml
inherit_gem:
rubocop-github:
- config/default.yml
- config/rails.yml
```

### Edge usage

**Gemfile**

``` ruby
Expand All @@ -43,6 +21,11 @@ inherit_gem:
- config/rails_edge.yml
```

### Legacy usage

If you are using a rubocop version < 1.0.0, you can use rubocop-github version
0.16.2 (see the README from that version for more details).

## Testing

`bundle install`
Expand Down
333 changes: 0 additions & 333 deletions config/_default_shared.yml

This file was deleted.

0 comments on commit 695169d

Please sign in to comment.