Skip to content

Commit

Permalink
Specify unset_nil: false to ConfigLoader.merge_with_default
Browse files Browse the repository at this point in the history
Follow up rubocop/rubocop#7048.

This PR fixes the following warning.

```console
% cd path/to/rubocop-performance
% bundle exec rake generate_cops_documentation
Files:          54
Modules:         4 (    2 undocumented)
Classes:        55 (    0 undocumented)
Constants:     122 (  122 undocumented)
Attributes:      1 (    0 undocumented)
Methods:       117 (  100 undocumented)
 25.08% documented
Warning: AllCops does not support TargetRailsVersion parameter.

Supported parameters are:

  - RubyInterpreters
  - Include
  - Exclude
  - DefaultFormatter
  - DisplayCopNames
  - DisplayStyleGuide
  - StyleGuideBaseURL
  - ExtraDetails
  - StyleGuideCopsOnly
  - EnabledByDefault
  - DisabledByDefault
  - UseCache
  - MaxFilesInCache
  - CacheRootDirectory
  - AllowSymlinksInCacheRootDirectory
  - TargetRubyVersion

Warning: Rails/BulkChangeTable does not support Database parameter.

Supported parameters are:

  - Enabled
  - SupportedDatabases
  - Include

* generated
  /Users/koic/src/github.com/rubocop-hq/rubocop-rails/manual/cops_rails.md
```

Note: Use of `unset_nil: false` option requires a release higher than RuboCop 0.69.0.
  • Loading branch information
koic committed May 15, 2019
1 parent 5180fa2 commit 998ce23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rubocop/rails/inject.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def self.defaults!
hash = ConfigLoader.send(:load_yaml_configuration, path)
config = Config.new(hash, path)
puts "configuration from #{path}" if ConfigLoader.debug?
config = ConfigLoader.merge_with_default(config, path)
config = ConfigLoader.merge_with_default(config, path, unset_nil: false)
ConfigLoader.instance_variable_set(:@default_configuration, config)
end
end
Expand Down

0 comments on commit 998ce23

Please sign in to comment.