Skip to content

Commit c721ca0

Browse files
committed
build: update linters
1 parent be88f5a commit c721ca0

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

.golangci.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,20 @@ run:
1212
linters:
1313
disable-all: true
1414
enable:
15-
- deadcode
1615
- goconst
1716
- goimports
1817
- gosimple
1918
- govet
2019
- ineffassign
2120
- misspell
22-
# - staticcheck
2321
- unconvert
24-
# - unused
25-
- varcheck
2622
- typecheck
27-
23+
- unused
24+
- staticcheck
25+
- bidichk
26+
- durationcheck
27+
- exportloopref
28+
- whitespace
2829

2930
linters-settings:
3031
gofmt:

build/ci.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,21 +1013,21 @@ func doPurge(cmdline []string) {
10131013

10141014
// Iterate over the blobs, collect and sort all unstable builds
10151015
for i := 0; i < len(blobs); i++ {
1016-
if !strings.Contains(*blobs[i].Name, "unstable") {
1016+
if !strings.Contains(blobs[i].Name, "unstable") {
10171017
blobs = append(blobs[:i], blobs[i+1:]...)
10181018
i--
10191019
}
10201020
}
10211021
for i := 0; i < len(blobs); i++ {
10221022
for j := i + 1; j < len(blobs); j++ {
1023-
if blobs[i].Properties.LastModified.After(*blobs[j].Properties.LastModified) {
1023+
if blobs[i].Properties.LastModified.After(blobs[j].Properties.LastModified) {
10241024
blobs[i], blobs[j] = blobs[j], blobs[i]
10251025
}
10261026
}
10271027
}
10281028
// Filter out all archives more recent that the given threshold
10291029
for i, blob := range blobs {
1030-
if time.Since(*blob.Properties.LastModified) < time.Duration(*limit)*24*time.Hour {
1030+
if time.Since(blob.Properties.LastModified) < time.Duration(*limit)*24*time.Hour {
10311031
blobs = blobs[:i]
10321032
break
10331033
}

0 commit comments

Comments
 (0)