Skip to content

Commit

Permalink
Feature/ginkgolinter (#1235)
Browse files Browse the repository at this point in the history
* add ginkgolinter to golangci config

* fixed ginkgolinter errors
  • Loading branch information
kwitsch authored Nov 12, 2023
1 parent dc66eff commit 7615584
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
20 changes: 19 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ linters:
- wastedassign
- whitespace
- wsl
- ginkgolinter
disable:
- noctx
- contextcheck
Expand All @@ -72,7 +73,24 @@ linters:
linters-settings:
gomnd:
ignored-numbers:
- '0666'
- "0666"
ginkgolinter:
# Suppress the wrong length assertion warning.
suppress-len-assertion: true
# Suppress the wrong nil assertion warning.
suppress-nil-assertion: true
# Suppress the wrong error assertion warning.
suppress-err-assertion: true
# Suppress the wrong comparison assertion warning.
suppress-compare-assertion: true
# Suppress the function all in async assertion warning.
suppress-async-assertion: true
# Suppress warning for comparing values from different types, like int32 and uint32
suppress-type-compare-assertion: true
# Trigger warning for ginkgo focus containers like FDescribe, FContext, FWhen or FIt
forbid-focus-container: true
# Don't trigger warnings for HaveLen(0)
allow-havelen-zero: true

issues:
exclude-rules:
Expand Down
2 changes: 1 addition & 1 deletion api/api_interface_impl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ var _ = Describe("API implementation tests", func() {
var resp200 BlockingStatus200JSONResponse
Expect(resp).Should(BeAssignableToTypeOf(resp200))
resp200 = resp.(BlockingStatus200JSONResponse)
Expect(resp200.Enabled).Should(Equal(false))
Expect(resp200.Enabled).Should(BeFalse())
Expect(resp200.DisabledGroups).Should(HaveValue(Equal([]string{"gr1", "gr2"})))
Expect(resp200.AutoEnableInSec).Should(HaveValue(BeNumerically("==", 47)))
})
Expand Down
2 changes: 1 addition & 1 deletion lists/downloader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ var _ = Describe("Downloader", func() {
}
Expect(Bus().Subscribe(CachingFailedDownloadChanged, fn)).Should(Succeed())
DeferCleanup(func() {
Expect(Bus().Unsubscribe(CachingFailedDownloadChanged, fn))
Expect(Bus().Unsubscribe(CachingFailedDownloadChanged, fn)).Should(Succeed())
})

loggerHook = test.NewGlobal()
Expand Down

0 comments on commit 7615584

Please sign in to comment.