From c4e6a4627163b27d097ab737f853c760a4c28ba7 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Sun, 30 Oct 2022 21:43:56 +0000 Subject: [PATCH] rubocop: Set `inherit_mode` for allowed `Naming/MethodParameterName` - As I was looking through the RuboCop configs for `Naming/MethodParameterName`, since there was a fairly long-standing TODO here, I found that in the default RuboCop configs the method names `to` and `io` are [allowed by default](https://github.com/rubocop/rubocop/blob/41a8249b3595cc8656b823d50b2abe38206fd09a/config/default.yml#L2794). - But we weren't inheriting those allowed names correctly from the default configuration. This fixes that so that we get future enhancements automatically for this particular cop allowlist. --- Library/.rubocop.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Library/.rubocop.yml b/Library/.rubocop.yml index 3bc840b41a..091daf83ec 100644 --- a/Library/.rubocop.yml +++ b/Library/.rubocop.yml @@ -371,6 +371,9 @@ Metrics/PerceivedComplexity: # allow those that are standard # TODO: try to remove some of these Naming/MethodParameterName: + inherit_mode: + merge: + - AllowedNames AllowedNames: - "a" - "b" @@ -383,14 +386,12 @@ Naming/MethodParameterName: - "ff" - "fn" - "id" - - "io" - "o" - "p" - "pr" - "r" - "rb" - "s" - - "to" - "v" # GitHub diff UI wraps beyond 118 characters