From adf482f59c021ff2869b69d6bab3ccc56744c966 Mon Sep 17 00:00:00 2001 From: Miguel Toyas Pernichi <168015510+mitoperni@users.noreply.github.com> Date: Mon, 6 Jan 2025 12:25:38 +0000 Subject: [PATCH] Fixed typespec-warning --- lib/sobelow/finding_log.ex | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/sobelow/finding_log.ex b/lib/sobelow/finding_log.ex index 702ec69..a9d4cd1 100644 --- a/lib/sobelow/finding_log.ex +++ b/lib/sobelow/finding_log.ex @@ -108,6 +108,8 @@ defmodule Sobelow.FindingLog do defp format_sarif(finding) do [mod, _] = String.split(finding.type, ":", parts: 2) + mod_struct = Sobelow.get_mod(mod) + rule_id = if is_struct(mod_struct), do: mod_struct.id, else: nil %{ ruleId: Sobelow.get_mod(mod).id,