From 0bd4ed0c4536c9f92569ca85465f4379459ec0e4 Mon Sep 17 00:00:00 2001 From: Sijawusz Pur Rahnama Date: Thu, 8 Dec 2022 14:16:38 +0100 Subject: [PATCH] Do not treat paths as literals in `Lint/LiteralAssignmentsInExpressions` --- src/ameba/rule/lint/literal_assignments_in_expressions.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ameba/rule/lint/literal_assignments_in_expressions.cr b/src/ameba/rule/lint/literal_assignments_in_expressions.cr index 3cc65818..1851bb0f 100644 --- a/src/ameba/rule/lint/literal_assignments_in_expressions.cr +++ b/src/ameba/rule/lint/literal_assignments_in_expressions.cr @@ -35,7 +35,7 @@ module Ameba::Rule::Lint def test(source, node : Crystal::If | Crystal::Unless | Crystal::Case | Crystal::While | Crystal::Until) return unless (cond = node.cond).is_a?(Crystal::Assign) - return unless literal?(cond.value, include_paths: true) + return unless literal?(cond.value) issue_for cond, MSG end