github-gitignore/Go.gitignore
Tomas Dabašinskas 74cf7151d9
fix(go-gitignore): prevent coverage.go files from being excluded
The current `coverage.*` pattern includes `*.go` files as well. If you use `go vendor`, this causes the following files to be excluded:

- `vendor/golang.org/x/text/internal/language/coverage.go`
- `vendor/golang.org/x/text/language/coverage.go`

This becomes a nightmare to troubleshoot why the local build works, yet a CI fails (as the files were not committed).

Adding `!coverage.go` ensure that `*.go` files do not get accidentally excluded.
2025-12-24 11:45:50 +02:00

34 lines
572 B
Plaintext

# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
# Test binary, built with `go test -c`
*.test
# Code coverage profiles and other test artifacts
*.out
coverage.*
!coverage.go
*.coverprofile
profile.cov
# Dependency directories (remove the comment below to include it)
# vendor/
# Go workspace file
go.work
go.work.sum
# env file
.env
# Editor/IDE
# .idea/
# .vscode/