Skip to content

Commit

Permalink
Enable Enabled parameter
Browse files Browse the repository at this point in the history
When the project configured as:
```yaml
# .rubocop.yml

require:
  - rubocop-rspec

AllCops:
  DisabledByDefault: true

RSpec:
  Enabled: true
```

an annoying warning pops up:
```
Warning: RSpec does not support Enabled parameter.

Supported parameters are:

  - Include
  - Language
```

This is not the case with e.g. `rubocop-rails`. Apparently, this is due
to our RSpec DSL configuration, as `rubocop-rails` doesn't have any
`Rails:` YAML configuration in their `config/default.yml`.
  • Loading branch information
pirj committed Jan 27, 2021
1 parent a117bc8 commit d6740a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

* Fix `HooksBeforeExamples`, `LeadingSubject`, `LetBeforeExamples` and `ScatteredLet` autocorrection to take into account inline comments and comments immediately before the moved node. ([@Darhazer][])
* Improve rubocop-rspec performance. ([@Darhazer][])
* Include `Enabled: true` to prevent a mismatched configuration parameter warning when `RSpec` cops are explicitly enabled in the user configuration. ([@pirj][])

## 2.1.0 (2020-12-17)

Expand Down
1 change: 1 addition & 0 deletions config/default.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
RSpec:
Enabled: true
Include:
- "**/*_spec.rb"
- "**/spec/**/*"
Expand Down

0 comments on commit d6740a4

Please sign in to comment.