Skip to content

Commit 8af3d0e

Browse files
committed
Fix CI: golangci-lint v2 config + git branch test fix
1 parent aaf6433 commit 8af3d0e

2 files changed

Lines changed: 4 additions & 17 deletions

File tree

‎.golangci.yml‎

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,8 @@ linters:
88
- ineffassign
99
- staticcheck
1010
- unused
11-
- gocritic
1211
- gofmt
1312
- goimports
1413
- misspell
1514
- unconvert
16-
- unparam
1715
- whitespace
18-
19-
settings:
20-
errcheck:
21-
check-type-assertions: true
22-
gocritic:
23-
enabled-tags:
24-
- performance
25-
- style
26-
27-
issues:
28-
exclude-rules:
29-
- path: _test\.go
30-
linters:
31-
- gocritic

‎repomap/changeset_test.go‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,10 @@ func TestFromGitDiff_TotalFilesCount(t *testing.T) {
174174
func TestFromGitDiffRange_BranchComparison(t *testing.T) {
175175
root := createGitRepoWithChanges(t)
176176

177-
// Commit the change on a branch
177+
// Ensure we're on a branch called "main" (CI may default to a different name)
178+
runGit(t, root, "branch", "-M", "main")
179+
180+
// Commit the change on a feature branch
178181
runGit(t, root, "checkout", "-b", "feature")
179182
runGit(t, root, "add", "-A")
180183
runGit(t, root, "commit", "-m", "add verify")

0 commit comments

Comments
 (0)