From 9cc6719279d2edab35fcf74a407d3225b1ea9727 Mon Sep 17 00:00:00 2001 From: OKURA Masafumi Date: Sun, 6 Nov 2022 14:33:08 +0900 Subject: [PATCH] Add `if` to allowed names list for MethodParameterName In library development, we sometimes use `if` as a keyword argument. The meaning of `if` is clear enough so we can accept it as an allowed name. --- changelog/change_add_if_to_allowed_names_list.md | 1 + config/default.yml | 1 + 2 files changed, 2 insertions(+) create mode 100644 changelog/change_add_if_to_allowed_names_list.md diff --git a/changelog/change_add_if_to_allowed_names_list.md b/changelog/change_add_if_to_allowed_names_list.md new file mode 100644 index 00000000000..38c5544fc04 --- /dev/null +++ b/changelog/change_add_if_to_allowed_names_list.md @@ -0,0 +1 @@ +* [#11158](https://github.com/rubocop/rubocop/pull/11158): Add `if` to allowed names list for MethodParameterName. ([@okuramasafumi][]) diff --git a/config/default.yml b/config/default.yml index 15931fcaff4..7d0cacdc5db 100644 --- a/config/default.yml +++ b/config/default.yml @@ -2808,6 +2808,7 @@ Naming/MethodParameterName: - by - db - id + - if - in - io - ip