Project

General

Profile

Actions

Bug #18534

closed

rubocop not configured for Ruby 2.0, suggests using 2.3 safe navigation operator

Added by Dominic Cleal almost 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Tests
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

rubocop 0.43+ is recommending the safe navigation operator from Ruby 2.3 be used in a number of sources files when running on Ruby 2.3, e.g.

$ be rubocop lib/ws_proxy.rb
Inspecting 1 file
C

Offenses:

lib/ws_proxy.rb:33:5: C: Use safe navigation (&.) instead of checking if an object exists before calling the method.
    socket.close unless socket.nil?
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

1 file inspected, 1 offense detected

It should be configured for Ruby 2.0 compatibility.


Related issues 1 (0 open1 closed)

Related to Foreman - Bug #17796: Disable cop: Rails/HttpPositionalArgumentsClosedShlomi Zadok12/20/2016Actions
Actions #1

Updated by Dominic Cleal almost 8 years ago

  • Related to Bug #17796: Disable cop: Rails/HttpPositionalArguments added
Actions #2

Updated by The Foreman Bot almost 8 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/4293 added
Actions #3

Updated by Dominic Cleal almost 8 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #4

Updated by Dominic Cleal almost 8 years ago

  • Translation missing: en.field_release set to 209
Actions

Also available in: Atom PDF