From 230f3b9b812b63e36c4009b33e2f609c64f0e292 Mon Sep 17 00:00:00 2001 From: Carlos Andres Bolanos Date: Sat, 24 Feb 2024 08:48:15 +0100 Subject: [PATCH] Fix test coverage --- .github/workflows/ci.yml | 6 +++--- lib/nebulex/caching/decorators.ex | 15 +++++---------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 61c52540..45bf2899 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,14 +21,14 @@ jobs: - elixir: 1.16.x otp: 26.x os: 'ubuntu-latest' - - elixir: 1.15.x - otp: 26.x - os: 'ubuntu-latest' style: true coverage: true sobelow: true dialyzer: true doctor: true + - elixir: 1.15.x + otp: 26.x + os: 'ubuntu-latest' - elixir: 1.14.x otp: 25.x os: 'ubuntu-latest' diff --git a/lib/nebulex/caching/decorators.ex b/lib/nebulex/caching/decorators.ex index f58f0cb0..9c45b084 100644 --- a/lib/nebulex/caching/decorators.ex +++ b/lib/nebulex/caching/decorators.ex @@ -886,16 +886,11 @@ if Code.ensure_loaded?(Decorator.Define) do walk(ast, acc) end - defp walk({var, _meta, context} = ast, acc) when is_atom(context) and is_atom(var) do - cond do - match?("_" <> _, "#{var}") -> - acc - - Macro.special_form?(var, 0) -> - acc - - true -> - [ast | acc] + defp walk({var, _meta, context} = ast, acc) when is_atom(var) and is_atom(context) do + if match?("_" <> _, "#{var}") or Macro.special_form?(var, 0) do + acc + else + [ast | acc] end end