Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add of to AllowedNames of MethodParameterName cop #8294

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Expand Up @@ -17,6 +17,11 @@
* [#7776](https://github.com/rubocop-hq/rubocop/issues/7776): Fix crash for `Layout/MultilineMethodCallBraceLayout` when comment is present before closing braces. ([@shekhar-patil][])
* [#8282](https://github.com/rubocop-hq/rubocop/issues/8282): Fix `Style/IfUnlessModifier` bad precedence detection. ([@tejasbubane][])

### Changes

* [#8294](https://github.com/rubocop-hq/rubocop/pull/8294): Sort `AllowedNames` of `MethodParameterName` cop. ([@AlexWayfer][])
* [#8294](https://github.com/rubocop-hq/rubocop/pull/8294): Add `of` to `AllowedNames` of `MethodParameterName` cop. ([@AlexWayfer][])

## 0.87.1 (2020-07-07)

### Bug fixes
Expand Down
13 changes: 7 additions & 6 deletions config/default.yml
Expand Up @@ -2179,17 +2179,18 @@ Naming/MethodParameterName:
AllowNamesEndingInNumbers: true
# Allowed names that will not register an offense
AllowedNames:
- io
- id
- to
- at
- by
- 'on'
- db
- id
- in
- at
- io
- ip
- db
- of
- 'on'
- os
- pp
- to
# Forbidden names that will register an offense
ForbiddenNames: []

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/cops_naming.adoc
Expand Up @@ -750,7 +750,7 @@ end
| Boolean

| AllowedNames
| `io`, `id`, `to`, `by`, `on`, `in`, `at`, `ip`, `db`, `os`, `pp`
| `at`, `by`, `db`, `id`, `in`, `io`, `ip`, `of`, `on`, `os`, `pp`, `to`
| Array

| ForbiddenNames
Expand Down