From 8b543e024588329ed0483d5c76f5c1d29c3897d8 Mon Sep 17 00:00:00 2001 From: Cristiano Piemontese Date: Thu, 18 Apr 2024 08:56:52 +0200 Subject: [PATCH] fix credo --- lib/instrumentation.ex | 2 +- test/event_type_test.exs | 12 +++--------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/lib/instrumentation.ex b/lib/instrumentation.ex index 1894a2c..1d00c27 100644 --- a/lib/instrumentation.ex +++ b/lib/instrumentation.ex @@ -222,5 +222,5 @@ defmodule OpentelemetryAbsinthe.Instrumentation do defp set_status(:ok), do: :ok defp set_status(:error), do: Tracer.set_status(OpenTelemetry.status(:error, "")) - defp telemetry_provider(), do: Application.get_env(:opentelemetry_absinthe, :telemetry_provider, :telemetry) + defp telemetry_provider, do: Application.get_env(:opentelemetry_absinthe, :telemetry_provider, :telemetry) end diff --git a/test/event_type_test.exs b/test/event_type_test.exs index dd006d4..f1ef552 100644 --- a/test/event_type_test.exs +++ b/test/event_type_test.exs @@ -62,15 +62,9 @@ defmodule OpentelemetryAbsintheTest.EventTypeTest.TelemetryProvider do Agent.start_link(fn -> 0 end, name: @me) end - def count() do - Agent.get(@me, & &1) - end + def count, do: Agent.get(@me, & &1) - defp increment() do - Agent.update(@me, &(&1 + 1)) - end + defp increment, do: Agent.update(@me, &(&1 + 1)) - def attach(_, _, _, _) do - increment() - end + def attach(_, _, _, _), do: increment() end