Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
- name: go mod tidy check
uses: katexochen/go-tidy-check@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v7
uses: golangci/golangci-lint-action@v9
with:
version: v2.0.1 # LINT_VERSION: update version in other places
version: v2.6.1 # LINT_VERSION: update version in other places
- id: govulncheck
uses: golang/govulncheck-action@v1
5 changes: 4 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ linters:
- dupl
- dupword
- durationcheck
- embeddedstructfieldcheck
- err113
- errchkjson
- errname
Expand All @@ -24,6 +25,7 @@ linters:
- forbidigo
- forcetypeassert
- funlen
- funcorder
- gocheckcompilerdirectives
- gochecknoglobals
- gochecknoinits
Expand All @@ -44,6 +46,7 @@ linters:
- inamedparam
- interfacebloat
- intrange
- iotamixing
- lll
- loggercheck
- maintidx
Expand Down Expand Up @@ -86,7 +89,7 @@ linters:
- wastedassign
- whitespace
- wrapcheck
- wsl
- wsl_v5
- zerologlint
settings:
dupl:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GO ?= go
GOBIN ?= $$($(GO) env GOPATH)/bin
GOLANGCI_LINT ?= $(GOBIN)/golangci-lint
GOLANGCI_LINT_VERSION ?= v2.0.1 # LINT_VERSION: update version in other places
GOLANGCI_LINT_VERSION ?= v2.6.1 # LINT_VERSION: update version in other places

# Code tidy
.PHONY: tidy
Expand Down
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ func main() {
if err != nil {
fmt.Println("Running coverage check failed.")
fmt.Printf("Error: %v\n", err)

if cfg.GithubActionOutput {
fmt.Printf("Please set `debug: true` input to see detailed output.")
} else {
fmt.Println("Please use `--debug=true` flag to see detailed output.")
}
}

if !pass || err != nil {
os.Exit(1)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/testcoverage/check_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ func TestCheckNoParallel(t *testing.T) {

t.Run("logger has output", func(t *testing.T) {
logger.Init()
defer logger.Destruct()
defer logger.Destruct() //nolint:wsl_v5 // relax

buf := &bytes.Buffer{}
cfg := Config{
Expand Down
2 changes: 2 additions & 0 deletions pkg/testcoverage/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,11 @@ func (c Config) Redacted() Config {
if r.Badge.CDN.Key != "" {
r.Badge.CDN.Key = r.Badge.CDN.Key[0:min(len(r.Badge.CDN.Key), 5)] + HiddenValue
}

if r.Badge.CDN.Secret != "" {
r.Badge.CDN.Secret = HiddenValue
}

if r.Badge.Git.Token != "" {
r.Badge.Git.Token = HiddenValue
}
Expand Down
1 change: 1 addition & 0 deletions pkg/testcoverage/coverage/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ func findModuleDirective(rootDir string) string {
if goModFile == "" {
logger.L.Warn().Str("dir", rootDir).
Msg("go.mod file not found in root directory (consider setting up source dir)")

return ""
}

Expand Down
Loading