From e8afe5070bbc0da062ea93c5f8cb05d8363c3b15 Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Mon, 19 Oct 2020 20:34:18 -0600 Subject: [PATCH] Address Ameba issues --- src/spectator/dsl/groups.cr | 2 +- src/spectator/example_node.cr | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/spectator/dsl/groups.cr b/src/spectator/dsl/groups.cr index 15deaac..4a4c0f7 100644 --- a/src/spectator/dsl/groups.cr +++ b/src/spectator/dsl/groups.cr @@ -38,7 +38,7 @@ module Spectator::DSL what.is_a?(Path) || what.is_a?(TypeNode) || what.is_a?(Union)) && - (described_type = what.resolve?).is_a?(TypeNode) %} + what.resolve?.is_a?(TypeNode) %} {{what.symbolize}} {% elsif what.is_a?(StringLiteral) || what.is_a?(StringInterpolation) || diff --git a/src/spectator/example_node.cr b/src/spectator/example_node.cr index 42f970a..4444ddc 100644 --- a/src/spectator/example_node.cr +++ b/src/spectator/example_node.cr @@ -54,7 +54,8 @@ module Spectator # Add padding between the node names # only if the names don't appear to be symbolic. - io << ' ' unless !group.name? || # Skip blank group names (like the root group). + # Skip blank group names (like the root group). + io << ' ' unless !group.name? || # ameba:disable Style/NegatedConditionsInUnless (group.name?.is_a?(Symbol) && name.is_a?(String) && (name.starts_with?('#') || name.starts_with?('.'))) end