Merge pull request #6297 from seanlaii/fix-QF1001

Fix lint issue QF1001
This commit is contained in:
karmada-bot 2025-04-14 14:12:01 +08:00 committed by GitHub
commit 4eb2d273ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 2 deletions

View File

@ -72,7 +72,6 @@ linters:
# Will fix the issues in the following PRs.
# Issue: https://github.com/karmada-io/karmada/issues/6273.
- "-ST1011"
- "-QF1001"
- "-ST1000"
exclusions:
generated: lax

View File

@ -250,7 +250,7 @@ func (g *CommandGetOptions) Validate(cmd *cobra.Command) error {
return fmt.Errorf("--show-labels option cannot be used with %s printer", outputOption)
}
}
if g.OutputWatchEvents && !(g.Watch || g.WatchOnly) {
if g.OutputWatchEvents && !g.Watch && !g.WatchOnly {
return fmt.Errorf("--output-watch-events option can only be used with --watch or --watch-only")
}