aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-04 09:09:09 +0800
committerGravatar Runxi Yu2026-03-04 09:10:22 +0800
commit2da7bba85f89289dd545cf967fd27efa4235c36e (patch)
tree518cba9ba737a97bcd61a44eecd43aa6f86382cb
parentci: apk upgrade (diff)
signatureNo signature
lint: Quick fix
-rw-r--r--.golangci.yaml2
-rw-r--r--object/tree_parse_test.go8
-rw-r--r--repository/stored_test.go8
3 files changed, 9 insertions, 9 deletions
diff --git a/.golangci.yaml b/.golangci.yaml
index 9abc2f16..3c6679f9 100644
--- a/.golangci.yaml
+++ b/.golangci.yaml
@@ -30,7 +30,7 @@ linters:
gosec:
excludes:
- G301 # UNIX permissions
- - G306
+ - G306 # UNIX permissions
revive:
rules:
- name: error-strings
diff --git a/object/tree_parse_test.go b/object/tree_parse_test.go
index d4b7c1e6..51c1e5b2 100644
--- a/object/tree_parse_test.go
+++ b/object/tree_parse_test.go
@@ -59,12 +59,12 @@ func TestTreeParseFromGit(t *testing.T) {
for _, want := range inserted.Entries {
got := tree.Entry(want.Name)
- //nolint:staticcheck
- if got == nil {
+
+ if got == nil { //nolint:staticcheck
t.Fatalf("Entry(%q) returned nil", want.Name)
}
- //nolint:staticcheck
- if got.Mode != want.Mode || got.ID != want.ID {
+
+ if got.Mode != want.Mode || got.ID != want.ID { //nolint:staticcheck
t.Fatalf("Entry(%q) mismatch", want.Name)
}
}
diff --git a/repository/stored_test.go b/repository/stored_test.go
index 6ebd4259..febfc461 100644
--- a/repository/stored_test.go
+++ b/repository/stored_test.go
@@ -315,12 +315,12 @@ func TestReadStoredTreeMixedModes(t *testing.T) {
for name, wantMode := range expect {
entry := rootTree.Tree().Entry([]byte(name))
- //nolint:staticcheck
- if entry == nil {
+
+ if entry == nil { //nolint:staticcheck
t.Fatalf("Entry(%q) returned nil", name)
}
- //nolint:staticcheck
- if entry.Mode != wantMode {
+
+ if entry.Mode != wantMode { //nolint:staticcheck
t.Fatalf("Entry(%q) mode = %o, want %o", name, entry.Mode, wantMode)
}
}