Add and apply Lint/RedundantSafeNavigation RuboCop rule
We've tested the updated behavior in RuboCop 1.69, found a new offense, and corrected it.
This commit is contained in:
@@ -311,6 +311,9 @@ Lint/NonAtomicFileOperation:
|
||||
Lint/ParenthesesAsGroupedExpression:
|
||||
Enabled: true
|
||||
|
||||
Lint/RedundantSafeNavigation:
|
||||
Enabled: true
|
||||
|
||||
Lint/RedundantStringCoercion:
|
||||
Enabled: true
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ class Legislation::AnnotationsController < Legislation::BaseController
|
||||
|
||||
def convert_ranges_parameters
|
||||
annotation = params[:legislation_annotation]
|
||||
if annotation && annotation[:ranges]&.is_a?(String)
|
||||
if annotation && annotation[:ranges].is_a?(String)
|
||||
params[:legislation_annotation][:ranges] = JSON.parse(annotation[:ranges])
|
||||
end
|
||||
rescue JSON::ParserError
|
||||
|
||||
Reference in New Issue
Block a user