Skip to content

Commit 4cb1d2a

Browse files
Merge pull request #256 from NETWAYS/update/linter_config
Update/linter config
2 parents 5e67fe8 + 4ddb08e commit 4cb1d2a

File tree

4 files changed

+17
-5
lines changed

4 files changed

+17
-5
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ jobs:
1717
- name: golangci-lint
1818
uses: golangci/golangci-lint-action@v6
1919
with:
20-
version: v1.54
20+
version: v1.61

.golangci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
run:
22
timeout: 5m
3-
skip-files:
3+
4+
issues.exclude-files:
45
- '(.+)_test\.go'
56

67
linters:
@@ -14,7 +15,6 @@ linters:
1415
- wsl
1516
- exportloopref
1617
disable:
17-
- scopelint
1818
presets:
1919
- bugs
2020
- unused

internal/s3/bucket.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,16 @@ type V2Output struct {
1616
}
1717

1818
func (v *V2Output) GetBucketOutput(size int64, status int) (output string) {
19+
var tmp_size uint64
20+
21+
if size >= 0 {
22+
tmp_size = uint64(size)
23+
}
24+
1925
output = fmt.Sprintf(" \\_[%s] %s - value: %s",
2026
check.StatusText(status),
2127
*v.V2Output.Name,
22-
convert.BytesIEC(size))
28+
convert.BytesIEC(tmp_size))
2329

2430
return
2531
}

internal/s3/object.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,16 @@ import (
77
)
88

99
func (v *V2Output) GetObjectOutput(size int64, status int, path string) (output string) {
10+
var tmp_size uint64
11+
12+
if size >= 0 {
13+
tmp_size = uint64(size)
14+
}
15+
1016
output += fmt.Sprintf(" \\_[%s] %s: %s\n",
1117
check.StatusText(status),
1218
path,
13-
convert.BytesIEC(size))
19+
convert.BytesIEC(tmp_size))
1420

1521
return
1622
}

0 commit comments

Comments
 (0)