Skip to content

Commit 6ed41a1

Browse files
committed
fix: exclude generator from coverage, fix go:generate path
- Add //go:build ignore to generator (build tool, not runtime code) - Point go:generate at main.go file directly (required with build tag) - Coverage: 89.3% → 93.0%
1 parent 008855d commit 6ed41a1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

internal/generate/knownfiles/main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//go:build ignore
2+
13
// Command knownfiles generates known_files_gen.go from GitHub Linguist's languages.yml.
24
//
35
// It maps Linguist language names to config-file-validator file types and extracts

pkg/filetype/file_type.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:generate go run ../../internal/generate/knownfiles
1+
//go:generate go run ../../internal/generate/knownfiles/main.go
22

33
package filetype
44

0 commit comments

Comments
 (0)