Skip to content

fix(go): use correct flag for skipped aliases - #634

Merged
AndreyMarkinPPC merged 1 commit into
mainfrom
go-fix-aliases
Oct 15, 2026
Merged

AndreyMarkinPPC merged 1 commit into
mainfrom
go-fix-aliases

Conversation

@AndreyMarkinPPC

Copy link
Copy Markdown
Member

No description provided.

@AndreyMarkinPPC AndreyMarkinPPC self-assigned this Oct 15, 2026
@AndreyMarkinPPC
AndreyMarkinPPC merged commit 86172f0 into main Oct 15, 2026
6 checks passed
@AndreyMarkinPPC
AndreyMarkinPPC deleted the go-fix-aliases branch October 15, 2026 08:43

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request renames the command-line flag excluded-aliases to skipped-aliases in sdk/go/garf/cmd/run.go. Feedback suggests improving the robustness of parsing comma-separated aliases by trimming surrounding whitespace and ignoring empty elements when splitting the input string.

Comment thread sdk/go/garf/cmd/run.go
Comment on lines +44 to 46
if skippedAliases != "" {
options.SkippedAliases = strings.Split(skippedAliases, ",")
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

When parsing comma-separated command-line flags, users often include spaces around the commas (e.g., --skipped-aliases "alias1, alias2"). Directly splitting by "," without trimming whitespace will result in elements with leading or trailing spaces (e.g., " alias2"), which can cause matching logic to fail. Trimming spaces and ignoring empty elements ensures more robust input parsing.

		if skippedAliases != "" {
			for _, s := range strings.Split(skippedAliases, ",") {
				if trimmed := strings.TrimSpace(s); trimmed != "" {
					options.SkippedAliases = append(options.SkippedAliases, trimmed)
				}
			}
		}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant