Skip to content

Commit

Permalink
chore: fix linters warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Valery Piashchynski <[email protected]>
  • Loading branch information
rustatian committed Jun 25, 2024
1 parent b31ec77 commit 6e686a8
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ jobs:
- name: Run linter
uses: golangci/[email protected] # Action page: <https://github.com/golangci/golangci-lint-action>
with:
version: v1.54 # without patch version
version: v1.59 # without patch version
only-new-issues: false # show only new issues if it's a pull request
args: --timeout=10m --build-tags=race ./...
args: --timeout=10m --build-tags=race ./...
6 changes: 3 additions & 3 deletions .github/workflows/linux_inmemory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
timeout-minutes: 60
strategy:
matrix:
php: [ "8.2" ]
go: [ stable ]
os: [ "ubuntu-latest" ]
php: ["8.3"]
go: [stable]
os: ["ubuntu-latest"]
steps:
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v5 # action page: <https://github.com/actions/setup-go>
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/linux_jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
timeout-minutes: 60
strategy:
matrix:
php: [ "8.2" ]
go: [ stable ]
os: [ "ubuntu-latest" ]
php: ["8.3"]
go: [stable]
os: ["ubuntu-latest"]
steps:
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v5 # action page: <https://github.com/actions/setup-go>
Expand Down
14 changes: 3 additions & 11 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +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:
min-complexity: 15
godot:
Expand All @@ -36,7 +26,6 @@ linters-settings:
range-loops: true
for-loops: true
nolintlint:
allow-leading-space: false
require-specific: true

linters: # All available linters list: <https://golangci-lint.run/usage/linters/>
Expand Down Expand Up @@ -76,6 +65,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
1 change: 1 addition & 0 deletions memoryjobs/item.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ func (i *Item) NackWithOptions(redeliver bool, delay int) error {
}

if redeliver {
i.Options.Delay = delay
err := i.Options.requeueFn(context.Background(), i)
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion memorykv/kv.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ func (d *Driver) Clear() error {
newCh := make(chan struct{})
d.broadcastStopCh.Swap(&newCh)

d.heap.Range(func(key any, value any) bool {
d.heap.Range(func(key any, _ any) bool {
d.heap.Delete(key)
return true
})
Expand Down

0 comments on commit 6e686a8

Please sign in to comment.