Skip to content

Commit

Permalink
chore(ci): upgraded linter to 1.45 (#1836)
Browse files Browse the repository at this point in the history
* chore(deps): upgraded linter to 1.45

* fixed linter warning
  • Loading branch information
jkowalski committed Mar 19, 2022
1 parent 6ba2f58 commit 9054fd0
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 17 deletions.
2 changes: 2 additions & 0 deletions .golangci.yml
@@ -1,3 +1,5 @@
run:
go: 1.17
linters-settings:
govet:
check-shadowing: true
Expand Down
8 changes: 4 additions & 4 deletions cli/command_policy_show.go
Expand Up @@ -265,7 +265,7 @@ func appendLoggingPolicyRows(rows []policyTableRow, p *policy.Policy, def *polic
func appendSchedulingPolicyRows(rows []policyTableRow, p *policy.Policy, def *policy.Definition) []policyTableRow {
rows = append(rows, policyTableRow{"Scheduling policy:", "", ""})

any := false
hasAny := false

rows = append(rows, policyTableRow{" Scheduled snapshots:", "", ""})

Expand All @@ -276,7 +276,7 @@ func appendSchedulingPolicyRows(rows []policyTableRow, p *policy.Policy, def *po
definitionPointToString(p.Target(), def.SchedulingPolicy.IntervalSeconds),
})

any = true
hasAny = true
}

if len(p.SchedulingPolicy.TimesOfDay) > 0 {
Expand All @@ -286,10 +286,10 @@ func appendSchedulingPolicyRows(rows []policyTableRow, p *policy.Policy, def *po
rows = append(rows, policyTableRow{" " + tod.String(), "", ""})
}

any = true
hasAny = true
}

if !any {
if !hasAny {
rows = append(rows, policyTableRow{" None.", "", ""})
}

Expand Down
6 changes: 3 additions & 3 deletions internal/server/api_estimate.go
Expand Up @@ -55,7 +55,7 @@ func (p estimateTaskProgress) Stats(ctx context.Context, st *snapshot.Stats, inc
}

func logBucketSamples(ctx context.Context, buckets snapshotfs.SampleBuckets, prefix string, showExamples bool) {
any := false
hasAny := false

for i, bucket := range buckets {
if bucket.Count == 0 {
Expand All @@ -78,7 +78,7 @@ func logBucketSamples(ctx context.Context, buckets snapshotfs.SampleBuckets, pre
sizeRange,
bucket.Count, units.BytesStringBase10(bucket.TotalSize))

any = true
hasAny = true

if showExamples && len(bucket.Examples) > 0 {
log(ctx).Infof("Examples:")
Expand All @@ -89,7 +89,7 @@ func logBucketSamples(ctx context.Context, buckets snapshotfs.SampleBuckets, pre
}
}

if !any {
if !hasAny {
log(ctx).Infof("%v files: None", prefix)
}
}
Expand Down
6 changes: 3 additions & 3 deletions snapshot/snapshotfs/source_directories.go
Expand Up @@ -111,7 +111,7 @@ func disambiguateSafeNames(m map[string]string) map[string]string {
}

result := map[string]string{}
any := false
hasAny := false

for _, originals := range safe2original {
if len(originals) == 1 {
Expand All @@ -128,11 +128,11 @@ func disambiguateSafeNames(m map[string]string) map[string]string {
}
}

any = true
hasAny = true
}
}

if !any {
if !hasAny {
return result
}

Expand Down
12 changes: 6 additions & 6 deletions tools/gettool/checksums.txt
Expand Up @@ -8,12 +8,12 @@ https://github.com/gohugoio/hugo/releases/download/v0.89.2/hugo_extended_0.89.2_
https://github.com/gohugoio/hugo/releases/download/v0.89.2/hugo_extended_0.89.2_macOS-64bit.tar.gz: f9185f6d14eb84d9029d59cdd8a977f2f0be334c4f9d38f2099e56a0c0734731
https://github.com/gohugoio/hugo/releases/download/v0.89.2/hugo_extended_0.89.2_macOS-ARM64.tar.gz: 99a5b4738528d4858a0237199eabc7aee77674c8c7edcfe269efb4b515566cec
https://github.com/gohugoio/hugo/releases/download/v0.89.2/hugo_extended_0.89.2_windows-64bit.zip: 8d79db4f24fbf023c64862c37d09291ac216875dad91e71dd8753cb5883e4274
https://github.com/golangci/golangci-lint/releases/download/v1.44.2/golangci-lint-1.44.2-darwin-amd64.tar.gz: ec6a8f0d6b2cb65efcc7ec138d91055b2ba51433093f97f8b76ce53ab5502971
https://github.com/golangci/golangci-lint/releases/download/v1.44.2/golangci-lint-1.44.2-darwin-arm64.tar.gz: b2e1066e66401f2287b10d5cc1856c1e6bb4bd5daac658f707592ec1c1fed1eb
https://github.com/golangci/golangci-lint/releases/download/v1.44.2/golangci-lint-1.44.2-linux-amd64.tar.gz: 461e238f83e2b3deb48665be15d835fd3eab75a9a0138074ca2ad81315e0c3aa
https://github.com/golangci/golangci-lint/releases/download/v1.44.2/golangci-lint-1.44.2-linux-arm64.tar.gz: 0dd3510a62975d69f0907448d9a1e489325612522abaafd79bd18515b931a11f
https://github.com/golangci/golangci-lint/releases/download/v1.44.2/golangci-lint-1.44.2-linux-armv6.tar.gz: 6fc6bd3438de33c6a9a654d8e5bea7e12868fb80b29001ba7cf96d937b1e9a8e
https://github.com/golangci/golangci-lint/releases/download/v1.44.2/golangci-lint-1.44.2-windows-amd64.zip: 8fc94fd292c4905332dcaee61dfe9104dc15713f49477c7494b63ee07a638a66
https://github.com/golangci/golangci-lint/releases/download/v1.45.0/golangci-lint-1.45.0-darwin-amd64.tar.gz: f53826957a96a3312f5e932299024a1274b31c8b70d54510803222fb5d9f7af8
https://github.com/golangci/golangci-lint/releases/download/v1.45.0/golangci-lint-1.45.0-darwin-arm64.tar.gz: b1dac279dbcd58938a2f77311d5d50e0b9624b518c849851f7a9d3d859cc14b2
https://github.com/golangci/golangci-lint/releases/download/v1.45.0/golangci-lint-1.45.0-linux-amd64.tar.gz: ca06a2b170f41a9e1e34d40ca88b15b8fed2d7e37310f0c08b7fc244c34292a9
https://github.com/golangci/golangci-lint/releases/download/v1.45.0/golangci-lint-1.45.0-linux-arm64.tar.gz: 4c83a0f70189e2b6656ca0216a22fb37087c1ffb10eb5df9a002bbea15c88354
https://github.com/golangci/golangci-lint/releases/download/v1.45.0/golangci-lint-1.45.0-linux-armv6.tar.gz: 8b9efb2c39e5649ce99bf48650671ce84c376176ff4fcc1c1dfd81cf889b3ee5
https://github.com/golangci/golangci-lint/releases/download/v1.45.0/golangci-lint-1.45.0-windows-amd64.zip: a8176b8ff5133de7da4393965091c429f251ecd74405289a80318f62d8284e47
https://github.com/goreleaser/goreleaser/releases/download/v0.176.0/goreleaser_Darwin_arm64.tar.gz: 1f95e6561974f4766d8833438b646b06930563ca9867447ea03edb623d876c75
https://github.com/goreleaser/goreleaser/releases/download/v0.176.0/goreleaser_Darwin_x86_64.tar.gz: 17ecad881a50e32f033da5a200c8417d37cae70f09e925645452937998aca506
https://github.com/goreleaser/goreleaser/releases/download/v0.176.0/goreleaser_Linux_arm64.tar.gz: 8bf2a9b9e84498bfa239f2fe91b2d555642c87ab9d3f5d37f29e6e97116910a3
Expand Down
2 changes: 1 addition & 1 deletion tools/tools.mk
Expand Up @@ -102,7 +102,7 @@ retry:=
endif

# tool versions
GOLANGCI_LINT_VERSION=1.44.2
GOLANGCI_LINT_VERSION=1.45.0
NODE_VERSION=16.13.0
HUGO_VERSION=0.89.2
GOTESTSUM_VERSION=1.7.0
Expand Down

0 comments on commit 9054fd0

Please sign in to comment.