mirror of
https://github.com/lima-vm/lima.git
synced 2026-10-28 11:44:35 +08:00
lint: fix revive issues from golangci-lint 2.8.0
Add nolint directive for flag.Parse() in external driver server (the Serve function is intended to be called from main). Add exclusion for "api" package names in hostagent and guestagent. Signed-off-by: Jan Dubois <jan.dubois@suse.com>
This commit is contained in:
1 parent
734da9f86c
commit
de1571f501
2 files changed
+6
-1
No files matched your search
@@ -148,6 +148,11 @@ linters:
|
||||
- linters:
|
||||
- godot
|
||||
path: _test\.go
|
||||
# Allow "api" package names in hostagent and guestagent.
|
||||
- linters:
|
||||
- revive
|
||||
path: pkg/(hostagent|guestagent)/api/
|
||||
text: avoid meaningless package names
|
||||
issues:
|
||||
# Maximum issues count per one linter.
|
||||
max-issues-per-linter: 0
|
||||
|
||||
Vendored
+1
-1
@@ -55,7 +55,7 @@ func (t *listenerTracker) Accept() (net.Conn, error) {
|
||||
func Serve(ctx context.Context, driver driver.Driver) {
|
||||
preConfiguredDriverAction := flag.Bool("pre-driver-action", false, "Run pre-driver action before starting the gRPC server")
|
||||
inspectStatus := flag.Bool("inspect-status", false, "Inspect status of the driver")
|
||||
flag.Parse()
|
||||
flag.Parse() //nolint:revive // Serve is intended to be called from external driver's main()
|
||||
if *preConfiguredDriverAction {
|
||||
handlePreConfiguredDriverAction(ctx, driver)
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user