mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-15 12:17:56 +00:00
chore: enable dogsled linter (#3921)
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
This commit is contained in:
parent
7d7a23e74a
commit
474223dc5b
2 changed files with 2 additions and 1 deletions
|
@ -5,6 +5,7 @@ linters:
|
||||||
- bodyclose
|
- bodyclose
|
||||||
- containedctx
|
- containedctx
|
||||||
- deadcode
|
- deadcode
|
||||||
|
- dogsled
|
||||||
- durationcheck
|
- durationcheck
|
||||||
- errcheck
|
- errcheck
|
||||||
- exportloopref
|
- exportloopref
|
||||||
|
|
|
@ -72,7 +72,7 @@ type Generation struct {
|
||||||
// It assumes that the project directory is 2 levels up. This means if this function is moved
|
// It assumes that the project directory is 2 levels up. This means if this function is moved
|
||||||
// it may not work as expected.
|
// it may not work as expected.
|
||||||
func RootDir() string {
|
func RootDir() string {
|
||||||
_, b, _, _ := runtime.Caller(0)
|
_, b, _, _ := runtime.Caller(0) // nolint:dogsled
|
||||||
d := ospath.Join(ospath.Dir(b))
|
d := ospath.Join(ospath.Dir(b))
|
||||||
d = filepath.Dir(d)
|
d = filepath.Dir(d)
|
||||||
return filepath.Dir(d)
|
return filepath.Dir(d)
|
||||||
|
|
Loading…
Add table
Reference in a new issue