Skip to content

Conversation

@nmaggioni
Copy link

Since the [ignore-]checks flags can already be specified multiple times, now it can be done with the [ignore-]namespaces flags too. Their output is logically AND'ed.

The long options have been renamed from namespace to namespaces for consistency with the rest of the flags. This is a breaking change for those who use the long options but not the shorthands.

The precondition of specifying either includes or excludes is still valid.

Copy link
Contributor

@adamwg adamwg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

This change itself looks good, but I would like to preserve backward compatibility with the existing flag names so we don't break anyone who might be using clusterlint from scripts/CI/etc.

cli.StringFlag{
Name: "n, namespace",
cli.StringSliceFlag{
Name: "n, namespaces",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To preserve backward compatibility you can add namespace as another alias here. It will look a little awkward in the help, but I'd like to avoid breaking existing users. I.e.:

Name: "n, namespaces, namespace",

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, makes sense. Do you want to add singular aliases to the checks and groups flags too (ex.: Name: "c, checks, check",) to show a common pattern?

@nmaggioni nmaggioni requested a review from adamwg August 11, 2025 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants