README.md in radius-spec-0.2.0 vs README.md in radius-spec-0.2.1
- old
+ new
@@ -90,23 +90,39 @@
## Features
### Common Rubocop Config
-Projects can inherit from the [base Rubocop config](.rubocop.yml) by using
-either the remote raw URL or dependency gem formats:
+Projects can inherit from the [base Rubocop config](.rubocop.yml). This can be
+accomplished by using either the remote raw URL or dependency gem formats. With
+either method we also strongly suggest setting the `inherit_mode` to `merge`
+for both `Exclude` and `IgnoredPatterns`. This way you can append additional
+exceptions without overwriting the defaults.
+#### Inherit from Gem (Recommended Method)
+
```yaml
-# Recommended Method
+inherit_mode:
+ merge:
+ - Exclude
+ - IgnoredPatterns
+
inherit_gem:
radius-spec:
- common_rubocop.yml
# Use the following instead if it is a Rails project
- common_rubocop_rails.yml
```
+#### Inherit from URL
+
```yaml
+inherit_mode:
+ merge:
+ - Exclude
+ - IgnoredPatterns
+
# Available for projects which cannot include this gem (i.e. Ruby < 2.5)
inherit_from:
- https://raw.githubusercontent.com/RadiusNetworks/radius-spec/master/common_rubocop.yml
# Use the following instead if it is a Rails project
- https://raw.githubusercontent.com/RadiusNetworks/radius-spec/master/common_rubocop_rails.yml
@@ -118,10 +134,12 @@
```
.rubocop-https---raw-githubusercontent-com-RadiusNetworks-radius-spec-master-common-rubocop-rails-yml
.rubocop-https---raw-githubusercontent-com-RadiusNetworks-radius-spec-master-common-rubocop-yml
```
+#### General Inheritance Notes
+
Be sure to include the project's local `.rubocop_todo.yml` **after** inheriting
the base configuration so that they take precedence. Also, use the directive
`inherit_mode` to specify which array configurations to merge together instead
of overriding the inherited value. This can be set both globally and for
specific cops:
@@ -135,9 +153,10 @@
inherit_from: .rubocop_todo.yml
inherit_mode:
merge:
- Exclude
+ - IgnoredPatterns
Style/For:
inherit_mode:
override:
- Exclude