configure lint and fix its problems

This commit is contained in:
Adem Baccara
2025-08-17 17:48:24 +01:00
parent 59845a359f
commit 76adc5801e
20 changed files with 304 additions and 54 deletions
+5 -7
View File
@@ -7,10 +7,6 @@ issues:
exclude-use-default: false
exclude-rules:
# disable some linters for api packages
- path: "api/*"
linters:
- lll
# disable some linters for internal packages
- path: "internal/*"
@@ -18,6 +14,7 @@ issues:
- dupl
- lll
# exclude some linters for the test directory and test files
- path: test/.*|.*_test\.go
linters:
@@ -40,10 +37,8 @@ linters:
- exhaustive
- ginkgolinter
- goconst
- gocritic
- gocyclo
- gofmt
- goheader
- goimports
- goprintffuncname
- gosec
@@ -55,7 +50,9 @@ linters:
- nakedret
- nolintlint
- prealloc
- gocritic
- revive
- goheader
- staticcheck
- typecheck
- unconvert
@@ -77,13 +74,14 @@ linters-settings:
- rangeValCopy
- unnamedResult
- whyNoLint
- hugeParam
goimports:
local-prefixes: github.com/kubeflow/notebooks/workspaces/backend
goheader:
template: |-
Copyright 2024.
Copyright 2025.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.