Skip to content

Commit

Permalink
[Fix #8749] Disable Style/IpAddresses by default in gemfiles and ge…
Browse files Browse the repository at this point in the history
…mspec files.
  • Loading branch information
dvandersluis authored and bbatsov committed Sep 22, 2020
1 parent fa97782 commit 4ed3a2a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -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)

Expand Down
7 changes: 6 additions & 1 deletion config/default.yml
Expand Up @@ -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.'
Expand Down
6 changes: 5 additions & 1 deletion docs/modules/ROOT/pages/cops_style.adoc
Expand Up @@ -4460,7 +4460,7 @@ end
| Yes
| No
| 0.58
| 0.77
| 0.91
|===

This cop checks for hardcoded IP addresses, which can make code
Expand Down Expand Up @@ -4488,6 +4488,10 @@ ip_address = ENV['DEPLOYMENT_IP_ADDRESS']
| AllowedAddresses
| `::`
| Array

| Exclude
| `**/*.gemfile`, `**/Gemfile`, `**/gems.rb`, `**/*.gemspec`
| Array
|===

== Style/KeywordParametersOrder
Expand Down

0 comments on commit 4ed3a2a

Please sign in to comment.