From efd4719297b91a0338f4c89183f1422af1b5a4b1 Mon Sep 17 00:00:00 2001 From: Paul Johnston Date: Wed, 13 Dec 2023 23:43:16 -0700 Subject: [PATCH] ensure glob results are sorted --- pkg/glob/glob.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/glob/glob.go b/pkg/glob/glob.go index e5b9db0..0d93456 100644 --- a/pkg/glob/glob.go +++ b/pkg/glob/glob.go @@ -4,6 +4,7 @@ import ( "fmt" "io/fs" "log" + "sort" "github.com/bazelbuild/bazel-gazelle/rule" "github.com/bazelbuild/buildtools/build" @@ -85,6 +86,8 @@ func Apply(glob rule.GlobValue, fs fs.FS) (srcs []string) { srcs = append(srcs, includes...) } + sort.Strings(srcs) + return }