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

[Fix #8749] Disable Style/IpAddresses by default in gemfiles and gemspec files #8758

Merged
merged 1 commit into from Sep 22, 2020
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -18,6 +18,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