Skip to content

Commit

Permalink
fix: linters
Browse files Browse the repository at this point in the history
Signed-off-by: Valery Piashchynski <[email protected]>
  • Loading branch information
rustatian committed Aug 27, 2024
1 parent a9cf419 commit 8afa4d0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Linters
on: [push, pull_request]

jobs:
golangci-lint:
linters:
name: Golang-CI (lint)
runs-on: ubuntu-latest
steps:
Expand Down
11 changes: 3 additions & 8 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,11 @@

run:
timeout: 1m
skip-dirs:
- .github
- .git
allow-parallel-runners: true

output:
format: colored-line-number # colored-line-number|line-number|json|tab|checkstyle|code-climate

linters-settings:
wsl:
allow-assign-and-anything: true
govet:
check-shadowing: true
golint:
min-confidence: 0.1
gocyclo:
Expand Down Expand Up @@ -78,6 +70,9 @@ linters: # All available linters list: <https://golangci-lint.run/usage/linters/
- whitespace # Tool for detection of leading and trailing whitespace

issues:
exclude-dirs:
- .github
- .git
exclude-rules:
- path: _test\.go
linters:
Expand Down
2 changes: 1 addition & 1 deletion etag.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func SetEtag(weak bool, f http.File, name string, w http.ResponseWriter) {
}

calculatedEtag = append(calculatedEtag, '"')
calculatedEtag = appendUint(calculatedEtag, uint32(len(body)))
calculatedEtag = appendUint(calculatedEtag, uint32(len(body))) //nolint:gosec
calculatedEtag = append(calculatedEtag, '-')
calculatedEtag = appendUint(calculatedEtag, crc32.Checksum(body, crc32q))
calculatedEtag = append(calculatedEtag, '"')
Expand Down

0 comments on commit 8afa4d0

Please sign in to comment.