From b4986929eaa634363a7718fb68801c7942c13202 Mon Sep 17 00:00:00 2001 From: Danie Palm Date: Fri, 15 May 2026 08:31:37 +0200 Subject: [PATCH] Sort fingerprints when writing .sobelow-skips `Fingerprint.new_skips/0` returns `MapSet.to_list/1`, whose order is implementation-defined. The previous write path joined the list as-is, so re-running `--mark-skip-all` over the same set of findings could produce different line orderings, churning the file in version control. Sorting at the write boundary makes the on-disk output stable. --- lib/sobelow.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sobelow.ex b/lib/sobelow.ex index e7860564..ff5fe27e 100644 --- a/lib/sobelow.ex +++ b/lib/sobelow.ex @@ -476,7 +476,7 @@ defmodule Sobelow do fingerprints -> {:ok, iofile} = :file.open(cfile, [:append]) - fingerprints = Enum.join(fingerprints, "\n") + fingerprints = fingerprints |> Enum.sort() |> Enum.join("\n") :file.write(iofile, ["\n", fingerprints]) :file.close(iofile) end