Mentions légales du service

Skip to content

[rubocop] temporary disable Lint/ERBNewArgument errors

JACQUOT Pierre requested to merge fixrubocop into master

This merge request disable the Lint/ErbNewArguments error of rubocop, because I can't reproduce them on my personal machine.

Inspecting 58 files
.........WWW.W...W........................................
Offenses:
lib/refrepo/gen/puppet/dhcpg5k.rb:45:97: W: [Correctable] Lint/ErbNewArguments: Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.
    output = ERB.new(File.read(File.expand_path("templates/dhcp.erb", File.dirname(__FILE__))), nil, '-').result(binding)
                                                                                                ^^^
lib/refrepo/gen/puppet/dhcpg5k.rb:45:102: W: [Correctable] Lint/ErbNewArguments: Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: '-') instead.
    output = ERB.new(File.read(File.expand_path("templates/dhcp.erb", File.dirname(__FILE__))), nil, '-').result(binding)
                                                                                                     ^^^
lib/refrepo/gen/puppet/kadeployg5k.rb:153:113: W: [Correctable] Lint/ErbNewArguments: Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.
        output = ERB.new(File.read(File.expand_path('templates/kadeployg5k.conf.erb', File.dirname(__FILE__))), nil, '-').result(binding)
                                                                                                                ^^^
lib/refrepo/gen/puppet/kadeployg5k.rb:153:118: W: [Correctable] Lint/ErbNewArguments: Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: '-') instead.
        output = ERB.new(File.read(File.expand_path('templates/kadeployg5k.conf.erb', File.dirname(__FILE__))), nil, '-').result(binding)
                                                                                                                     ^^^
lib/refrepo/gen/puppet/kavlang5k.rb:47:82: W: [Correctable] Lint/ErbNewArguments: Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.
    conf = YAML::load(ERB.new(File.read("#{options[:conf_dir]}/kavlang5k.yaml"), nil, '-').result(binding))[site_uid]
                                                                                 ^^^
lib/refrepo/gen/puppet/kavlang5k.rb:47:87: W: [Correctable] Lint/ErbNewArguments: Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: '-') instead.
    conf = YAML::load(ERB.new(File.read("#{options[:conf_dir]}/kavlang5k.yaml"), nil, '-').result(binding))[site_uid]
                                                                                      ^^^
lib/refrepo/gen/puppet/kavlang5k.rb:51:106: W: [Correctable] Lint/ErbNewArguments: Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.
      output = ERB.new(File.read(File.expand_path('templates/kavlan.conf.erb', File.dirname(__FILE__))), nil, '-').result(binding)
                                                                                                         ^^^
lib/refrepo/gen/puppet/kavlang5k.rb:51:111: W: [Correctable] Lint/ErbNewArguments: Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: '-') instead.
      output = ERB.new(File.read(File.expand_path('templates/kavlan.conf.erb', File.dirname(__FILE__))), nil, '-').result(binding)
                                                                                                              ^^^
lib/refrepo/gen/puppet/kavlang5k.rb:57:112: W: [Correctable] Lint/ErbNewArguments: Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.
    output = ERB.new(File.read(File.expand_path('templates/kavlan-cluster.conf.erb', File.dirname(__FILE__))), nil, '-').result(binding)
                                                                                                               ^^^
lib/refrepo/gen/puppet/kavlang5k.rb:57:117: W: [Correctable] Lint/ErbNewArguments: Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: '-') instead.
    output = ERB.new(File.read(File.expand_path('templates/kavlan-cluster.conf.erb', File.dirname(__FILE__))), nil, '-').result(binding)
                                                                                                                    ^^^
lib/refrepo/gen/puppet/kavlang5k.rb:64:113: W: [Correctable] Lint/ErbNewArguments: Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.
        output = ERB.new(File.read(File.expand_path('templates/kavlan-dhcp.conf.erb', File.dirname(__FILE__))), nil, '-').result(binding)
                                                                                                                ^^^
lib/refrepo/gen/puppet/kavlang5k.rb:64:118: W: [Correctable] Lint/ErbNewArguments: Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: '-') instead.
        output = ERB.new(File.read(File.expand_path('templates/kavlan-dhcp.conf.erb', File.dirname(__FILE__))), nil, '-').result(binding)
                                                                                                                     ^^^
lib/refrepo/gen/puppet/kavlang5k.rb:75:111: W: [Correctable] Lint/ErbNewArguments: Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.
      output = ERB.new(File.read(File.expand_path('templates/kavlan-dhcp.conf.erb', File.dirname(__FILE__))), nil, '-').result(binding)
                                                                                                              ^^^
lib/refrepo/gen/puppet/kavlang5k.rb:75:116: W: [Correctable] Lint/ErbNewArguments: Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: '-') instead.
      output = ERB.new(File.read(File.expand_path('templates/kavlan-dhcp.conf.erb', File.dirname(__FILE__))), nil, '-').result(binding)
                                                                                                                   ^^^
lib/refrepo/gen/puppet/kwollectg5k.rb:42:110: W: [Correctable] Lint/ErbNewArguments: Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.
        output = ERB.new(File.read(File.expand_path('templates/kwollect-node.erb', File.dirname(__FILE__))), nil, '-').result(binding)
                                                                                                             ^^^
lib/refrepo/gen/puppet/kwollectg5k.rb:42:115: W: [Correctable] Lint/ErbNewArguments: Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: '-') instead.
        output = ERB.new(File.read(File.expand_path('templates/kwollect-node.erb', File.dirname(__FILE__))), nil, '-').result(binding)
                                                                                                                  ^^^
lib/refrepo/gen/puppet/kwollectg5k.rb:52:111: W: [Correctable] Lint/ErbNewArguments: Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.
      output = ERB.new(File.read(File.expand_path('templates/kwollect-network.erb', File.dirname(__FILE__))), nil, '-').result(binding)
                                                                                                              ^^^
lib/refrepo/gen/puppet/kwollectg5k.rb:52:116: W: [Correctable] Lint/ErbNewArguments: Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: '-') instead.
      output = ERB.new(File.read(File.expand_path('templates/kwollect-network.erb', File.dirname(__FILE__))), nil, '-').result(binding)
                                                                                                                   ^^^
lib/refrepo/gen/puppet/kwollectg5k.rb:77:107: W: [Correctable] Lint/ErbNewArguments: Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.
      output = ERB.new(File.read(File.expand_path('templates/kwollect-pdu.erb', File.dirname(__FILE__))), nil, '-').result(binding)
                                                                                                          ^^^
lib/refrepo/gen/puppet/kwollectg5k.rb:77:112: W: [Correctable] Lint/ErbNewArguments: Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: '-') instead.
      output = ERB.new(File.read(File.expand_path('templates/kwollect-pdu.erb', File.dirname(__FILE__))), nil, '-').result(binding)
                                                                                                               ^^^
lib/refrepo/gen/puppet/kwollectg5k.rb:97:121: W: [Correctable] Lint/ErbNewArguments: Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.
      output = ERB.new(File.read(File.expand_path('templates/kwollect-wattmetre-mapping.erb', File.dirname(__FILE__))), nil, '-').result(binding)
                                                                                                                        ^^^
lib/refrepo/gen/puppet/kwollectg5k.rb:97:126: W: [Correctable] Lint/ErbNewArguments: Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: '-') instead.
      output = ERB.new(File.read(File.expand_path('templates/kwollect-wattmetre-mapping.erb', File.dirname(__FILE__))), nil, '-').result(binding)
                                                                                                                             ^^^
lib/refrepo/gen/puppet/oxidizedg5k.rb:21:104: W: [Correctable] Lint/ErbNewArguments: Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.
    output = ERB.new(File.read(File.expand_path('templates/oxidized.db.erb', File.dirname(__FILE__))), nil, '-').result(binding)
                                                                                                       ^^^
lib/refrepo/gen/puppet/oxidizedg5k.rb:21:109: W: [Correctable] Lint/ErbNewArguments: Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: '-') instead.
    output = ERB.new(File.read(File.expand_path('templates/oxidized.db.erb', File.dirname(__FILE__))), nil, '-').result(binding)
                                                                                                            ^^^
58 files inspected, 24 offenses detected, 24 offenses autocorrectable

I have opened a bug to track the subject: https://intranet.grid5000.fr/bugzilla/show_bug.cgi?id=14145

Edited by JACQUOT Pierre

Merge request reports