You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26-16Lines changed: 26 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,22 +4,32 @@ This repository provides recommended RuboCop configuration and additional Cops f
4
4
5
5
## Usage
6
6
7
-
**Gemfile**
8
-
9
-
```ruby
10
-
gem "rubocop-github"
11
-
gem "rubocop-performance", require:false
12
-
gem "rubocop-rails", require:false
13
-
```
14
-
15
-
**.rubocop.yml**
16
-
17
-
```yaml
18
-
inherit_gem:
19
-
rubocop-github:
20
-
- config/default.yml
21
-
- config/rails.yml
22
-
```
7
+
Add `rubocop-github` to your Gemfile, along with its dependencies:
8
+
9
+
```ruby
10
+
gem "rubocop-github", require:false
11
+
gem "rubocop-performance", require:false
12
+
gem "rubocop-rails", require:false
13
+
```
14
+
15
+
Inherit all of the stylistic rules and cops through an inheritance declaration in your `.rubocop.yml`:
16
+
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
+
```
23
33
24
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).
0 commit comments