Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow passing multiple categories #498

Merged
merged 3 commits into from
Feb 15, 2024
Merged

Allow passing multiple categories #498

merged 3 commits into from
Feb 15, 2024

Conversation

sourishkrout
Copy link
Member

This PR will treat the following code snippet like a list as opposed to the very last category overwrite all preceding ones.

$ runme run -c buzz -c bar

@sourishkrout
Copy link
Member Author

Review please @pastuxso.

if block.ExcludeFromRunAll() {
continue
}

if !slices.Contains(strings.Split(block.Category(), ","), category) {
bcats := strings.Split(block.Category(), ",")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggestion: Add block.Categories() and mark block.Category() as deprecated using // Deprecated: Use Categories() instead.

internal/cmd/run.go Outdated Show resolved Hide resolved
Co-authored-by: Adam Babik <a.babik@designfortress.com>
Copy link

sonarcloud bot commented Feb 15, 2024

@sourishkrout sourishkrout merged commit 8aa5bda into main Feb 15, 2024
6 checks passed
@sourishkrout sourishkrout deleted the multi-cat branch February 15, 2024 15:25
Copy link
Collaborator

@pastuxso pastuxso left a comment

Choose a reason for hiding this comment

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

late review, LGTM!

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.

3 participants