From 4ed3a2a45046a073574fa86c739847efe97438ac Mon Sep 17 00:00:00 2001 From: Daniel Vandersluis Date: Mon, 21 Sep 2020 11:18:18 -0400 Subject: [PATCH] [Fix #8749] Disable `Style/IpAddresses` by default in gemfiles and gemspec files. --- CHANGELOG.md | 1 + config/default.yml | 7 ++++++- docs/modules/ROOT/pages/cops_style.adoc | 6 +++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index db7bb5c702d..3b3d19712ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ * [#8489](https://github.com/rubocop-hq/rubocop/issues/8489): Exclude method `respond_to_missing?` from `OptionalBooleanParameter` cop. ([@em-gazelle][]) * [#7914](https://github.com/rubocop-hq/rubocop/issues/7914): Style/SafeNavigation marked as having unsafe auto-correction. ([@marcandre][]) +* [#8749](https://github.com/rubocop-hq/rubocop/issues/8749): Disable `Style/IpAddresses` by default in Gemfile and gemspec files. ([@dvandersluis][]) ## 0.91.0 (2020-09-15) diff --git a/config/default.yml b/config/default.yml index 62a9f559381..595fb33236e 100644 --- a/config/default.yml +++ b/config/default.yml @@ -3283,11 +3283,16 @@ Style/IpAddresses: Description: "Don't include literal IP addresses in code." Enabled: false VersionAdded: '0.58' - VersionChanged: '0.77' + VersionChanged: '0.91' # Allow addresses to be permitted AllowedAddresses: - "::" # :: is a valid IPv6 address, but could potentially be legitimately in code + Exclude: + - '**/*.gemfile' + - '**/Gemfile' + - '**/gems.rb' + - '**/*.gemspec' Style/KeywordParametersOrder: Description: 'Enforces that optional keyword parameters are placed at the end of the parameters list.' diff --git a/docs/modules/ROOT/pages/cops_style.adoc b/docs/modules/ROOT/pages/cops_style.adoc index 90e0bd1a29c..f0ab71073ec 100644 --- a/docs/modules/ROOT/pages/cops_style.adoc +++ b/docs/modules/ROOT/pages/cops_style.adoc @@ -4460,7 +4460,7 @@ end | Yes | No | 0.58 -| 0.77 +| 0.91 |=== This cop checks for hardcoded IP addresses, which can make code @@ -4488,6 +4488,10 @@ ip_address = ENV['DEPLOYMENT_IP_ADDRESS'] | AllowedAddresses | `::` | Array + +| Exclude +| `**/*.gemfile`, `**/Gemfile`, `**/gems.rb`, `**/*.gemspec` +| Array |=== == Style/KeywordParametersOrder