rubocop-github 0.18.0 → 0.19.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a5aac9faf8fd07df225b66910c710065d8d69fd889bd424778c3802374691d95
4
- data.tar.gz: fc3548902e7759613503804188cd2e71e45ff0e4c6464c7544c6f3a62d9addd3
3
+ metadata.gz: 7e2de9cd12a2e6dc23c4ab4af442fa0989b99c0b2f775300ea9137aa1d569591
4
+ data.tar.gz: eede5dc50f6f7fdf7fd4d05cede6b70a989e97c2c2df18420b97fefd8997782e
5
5
  SHA512:
6
- metadata.gz: d5850a48c2665aff47ca0d0505b20869d0e573e4bb4018a79132a78e64c3b7fd3fe9c27c0c472966a1ce1e9bcaf9969a61d9241d919f899769a6b73f308fd48a
7
- data.tar.gz: d451981724e1d7bc407f7bf0f5fb2078f97eb9779f83fa3168241e25b28beffebb06d55805bc8e7fee8eceb1621e8cc28ce0308f389e1ebe30edd4ef023108b5
6
+ metadata.gz: a8fc315cb6296196a0c3358990e2d5338217afcfbad7fc78a3dd636a52c32d3da2e2566906788fc8cf9818d3543d9939a59e431c3d7dc48eb105d58a8cb63f1e
7
+ data.tar.gz: da8ea70e7537cf46b80ccd81804bdbc407c45822a727c0715e571dc19f2706416ddefd6d1504da0f1a67254c4ef99bfdecc5054732eabbf1571a07a39d9c87e9
data/README.md CHANGED
@@ -4,22 +4,36 @@ This repository provides recommended RuboCop configuration and additional Cops f
4
4
 
5
5
  ## Usage
6
6
 
7
- **Gemfile**
7
+ Add `rubocop-github` to your Gemfile, along with its dependencies:
8
8
 
9
- ``` ruby
10
- gem "rubocop-github"
11
- gem "rubocop-performance", require: false
12
- gem "rubocop-rails", require: false
13
- ```
9
+ ```ruby
10
+ gem "rubocop-github", require: false
11
+ gem "rubocop-performance", require: false
12
+ gem "rubocop-rails", require: false
13
+ ```
14
14
 
15
- **.rubocop.yml**
15
+ Inherit all of the stylistic rules and cops through an inheritance declaration in your `.rubocop.yml`:
16
16
 
17
- ``` yaml
18
- inherit_gem:
19
- rubocop-github:
20
- - config/default_edge.yml
21
- - config/rails_edge.yml
22
- ```
17
+ ```yaml
18
+ # .rubocop.yml
19
+ inherit_from:
20
+ rubocop-github:
21
+ - config/default.yml # generic Ruby rules and cops
22
+ - config/rails.yml # Rails-specific rules and cops
23
+ ```
24
+
25
+ Alternatively, only require the additional custom cops in your `.rubocop.yml` without inheriting/enabling the other stylistic rules:
26
+
27
+ ```yaml
28
+ # .rubocop.yml
29
+ require:
30
+ - rubocop-github # generic Ruby cops only
31
+ - rubocop-github-rails # Rails-specific cops only
32
+ ```
33
+
34
+ 💭 Looking for `config/accessibility.yml` and the `GitHub/Accessibility` configs? They have been moved to [a new gem](https://github.com/github/rubocop-rails-accessibility).
35
+
36
+ For more granular control over which of RuboCop's rules are enabled for your project, both from this gem and your own configs, consider using the `DisabledByDefault: true` option under `AllCops` in your project's `.rubocop.yml` file. This will disable all cops by default, and you can then explicitly enable the ones you want by setting `Enabled: true`. See [the RuboCop docs](https://docs.rubocop.org/rubocop/configuration.html#enabled) for more information.
23
37
 
24
38
  ### Legacy usage
25
39
 
@@ -28,9 +42,11 @@ If you are using a rubocop version < 1.0.0, you can use rubocop-github version
28
42
 
29
43
  ## Testing
30
44
 
31
- `bundle install`
32
- `bundle exec rake test`
45
+ ``` bash
46
+ bundle install
47
+ bundle exec rake test
48
+ ```
33
49
 
34
50
  ## The Cops
35
51
 
36
- All cops are located under [`lib/rubocop/cop/github`](lib/rubocop/cop/github), and contain examples/documentation.
52
+ All cops are located under [`lib/rubocop/cop/github`](lib/rubocop/cop/github).