Skip to content

test: extract repeated literals in sync_skills_test to constants#1185

Merged
rdimitrov merged 1 commit intomainfrom
fix-goconst-sync-skills-test
May 5, 2026
Merged

test: extract repeated literals in sync_skills_test to constants#1185
rdimitrov merged 1 commit intomainfrom
fix-goconst-sync-skills-test

Conversation

@rdimitrov
Copy link
Copy Markdown
Member

Summary

Follow-up to the merged sync-skills work. The post-merge lint baseline still flags two goconst issues in cmd/catalog/sync_skills_test.go:

  • "security-review" — 9 standalone occurrences (test fixture skill name used as map key, filepath component, etc.)
  • "https://github.com/foo/bar" — 6 standalone occurrences (repoURLsMatch test cases)

Extracted both to package-level constants (securityReview, fixtureRepoURL) alongside the existing originalRef / bumpedRef block. Tests still pass; full-repo lint is 0 issues.

Test plan

  • go test ./cmd/catalog/... — passes.
  • golangci-lint run ./...0 issues.

Follow-up to the merged sync-skills work: `"security-review"` (9 occurrences)
and `"https://github.com/foo/bar"` (6 occurrences) were flagged by goconst
under the current golangci-lint version. Extract them to package-level
constants alongside the existing `originalRef` / `bumpedRef` block.

Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

Registry Build Preview

All registries built successfully!

Registry: official

  • Total Servers: 84
    • Container-based: 53
    • Remote: 31
  • Skills: 0
  • File Size: 1.7M
  • Last Updated: 2026-05-05T12:01:53Z

Registry: toolhive

  • Total Servers: 112
    • Container-based: 81
    • Remote: 31
  • Skills: 129
  • File Size: 1.9M
  • Last Updated: 2026-05-05T12:01:53Z

@rdimitrov rdimitrov merged commit 8439e4d into main May 5, 2026
5 checks passed
@rdimitrov rdimitrov deleted the fix-goconst-sync-skills-test branch May 5, 2026 12:04
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