From 7021ccc880fc6ed1b2fdd8c592dbc5d320205a6b Mon Sep 17 00:00:00 2001 From: oppiliappan Date: Sat, 13 Sep 2025 08:57:10 +0100 Subject: [PATCH] knotserver: detect bun.lock files as generated Change-Id: xvrvnuvsmslvwlmnywzulxxmvtukoyoq this is a patch fix, the real fix would be to add this to go-enry's list of generated file names. Signed-off-by: oppiliappan --- knotserver/git/language.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/knotserver/git/language.go b/knotserver/git/language.go index 0806889a..538d36cb 100644 --- a/knotserver/git/language.go +++ b/knotserver/git/language.go @@ -3,6 +3,7 @@ package git import ( "context" "path" + "strings" "github.com/go-enry/go-enry/v2" "github.com/go-git/go-git/v5/plumbing/object" @@ -20,7 +21,9 @@ func (g *GitRepo) AnalyzeLanguages(ctx context.Context) (LangBreakdown, error) { return nil } - if enry.IsGenerated(filepath, content) { + if enry.IsGenerated(filepath, content) || + enry.IsBinary(content) || + strings.HasSuffix(filepath, "bun.lock") { return nil } -- 2.43.0