diff --git a/share/linters/.rubocop.yml b/share/linters/.rubocop.yml index bb63db6533..c980ff4ff6 100644 --- a/share/linters/.rubocop.yml +++ b/share/linters/.rubocop.yml @@ -944,6 +944,9 @@ Lint/NonAtomicFileOperation: Lint/IncompatibleIoSelectWithFiberScheduler: Enabled: false +Lint/SymbolConversion: + Enabled: false + ######### # METRICS ######## diff --git a/src/cli/oneacct b/src/cli/oneacct index 80f08de33e..ef66ee70dd 100755 --- a/src/cli/oneacct +++ b/src/cli/oneacct @@ -75,7 +75,7 @@ CommandParser::CmdParser.new(ARGV) do exit(0) end - filter_flag = (options[:userfilter] || VirtualMachinePool::INFO_ALL) + filter_flag = options[:userfilter] || VirtualMachinePool::INFO_ALL if options[:start_time] start_time = options[:start_time].to_i else diff --git a/src/cli/oneshowback b/src/cli/oneshowback index 9509545cea..7f729243a7 100755 --- a/src/cli/oneshowback +++ b/src/cli/oneshowback @@ -77,7 +77,7 @@ CommandParser::CmdParser.new(ARGV) do exit(0) end - filter_flag = (options[:userfilter] || VirtualMachinePool::INFO_ALL) + filter_flag = options[:userfilter] || VirtualMachinePool::INFO_ALL start_month = -1 start_year = -1 diff --git a/src/flow/lib/models/role.rb b/src/flow/lib/models/role.rb index 512f2b7ddd..020114a54a 100644 --- a/src/flow/lib/models/role.rb +++ b/src/flow/lib/models/role.rb @@ -655,8 +655,8 @@ module OpenNebula return OpenNebula::Error.new("Role #{name} is in DONE state") end - do_offset = (!period.nil? && period.to_i > 0 && - !vms_per_period.nil? && vms_per_period.to_i > 0) + do_offset = !period.nil? && period.to_i > 0 && + !vms_per_period.nil? && vms_per_period.to_i > 0 nodes.each_with_index do |node, index| vm_id = node['deploy_id'] diff --git a/src/hem/onehem-server.rb b/src/hem/onehem-server.rb index 6fc49bb21f..50b1c2720b 100755 --- a/src/hem/onehem-server.rb +++ b/src/hem/onehem-server.rb @@ -193,7 +193,7 @@ module HEMHook def as_stdin? astdin = self['TEMPLATE/ARGUMENTS_STDIN'] - astdin &&= (astdin.casecmp('yes') || astdin.casecmp('true')) + astdin &&= astdin.casecmp('yes') || astdin.casecmp('true') return false if astdin.nil? diff --git a/src/onedb/fsck/quotas.rb b/src/onedb/fsck/quotas.rb index 0468adaddd..3c6e474c87 100644 --- a/src/onedb/fsck/quotas.rb +++ b/src/onedb/fsck/quotas.rb @@ -394,10 +394,10 @@ module OneDBFsck vm_elem.xpath("#{cpu}_USED").each do |e| cpu_used = (cpu_used / 100.0) - different = (e.text.to_f != cpu_used || - ![format('%.2f', cpu_used), - format('%.1f', cpu_used), - format('%.0f', cpu_used)].include?(e.text)) + different = e.text.to_f != cpu_used || + ![format('%.2f', cpu_used), + format('%.1f', cpu_used), + format('%.0f', cpu_used)].include?(e.text) cpu_used_str = format('%.2f', cpu_used) diff --git a/src/vmm_mad/remotes/lib/vcenter_driver/virtual_machine.rb b/src/vmm_mad/remotes/lib/vcenter_driver/virtual_machine.rb index 1de36a77b6..02ea268c9c 100644 --- a/src/vmm_mad/remotes/lib/vcenter_driver/virtual_machine.rb +++ b/src/vmm_mad/remotes/lib/vcenter_driver/virtual_machine.rb @@ -2720,7 +2720,7 @@ end img_name = VCenterDriver::FileHelper.unescape_path(img_name_escaped) vc_disks.each do |d| - key_matches = (unmanaged_key && d[:key] == unmanaged_key.to_i) + key_matches = unmanaged_key && d[:key] == unmanaged_key.to_i path_matches = (d[:path_wo_ds] == img_name) if key_matches || path_matches