Skip to content

test: expand refactoring registry coverage - #15

Closed
tomatotomata wants to merge 1 commit into
ailinter:mainfrom
tomatotomata:codex/refactoring-registry-coverage
Closed

test: expand refactoring registry coverage#15
tomatotomata wants to merge 1 commit into
ailinter:mainfrom
tomatotomata:codex/refactoring-registry-coverage

Conversation

@tomatotomata

Copy link
Copy Markdown

Summary

  • add table-driven input validation coverage for Lookup
  • validate that every embedded pattern returned by ListPatterns has a unique usable name and non-empty content
  • keep production code unchanged

Validation

  • git diff --check passes
  • Go tests and coverage are delegated to CI because Go 1.25 is not installed in my local environment

Closes #12

@tomatotomata
tomatotomata marked this pull request as ready for review July 31, 2026 09:13

@ailinter-dev ailinter-dev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review: Approve ✅

Verified locally (CI was blocked pending approval on this fork PR):

  • go test -cover ./internal/refactoring/85.7% coverage (issue target 80%+)
  • All 5 subtests pass; go vet clean; git diff --check clean
  • Additive test-only change (+78/-0), production code untouched

Non-blocking suggestions for a follow-up:

  1. TestLookup_InputValidation "unsupported name" case uses smell: "unsupported_language" which reads like a language — unknown_smell would be clearer.
  2. contentHint: "Guard Clauses" couples the test to strategy content; a non-empty check is more robust.

Nice work — clean table-driven coverage, matches repo patterns.

}

func TestLookup_InputValidation(t *testing.T) {
tests := []struct {
}
}

func TestLookup_InputValidation(t *testing.T) {
t.Run(tt.name, func(t *testing.T) {
pattern := refactoring.Lookup(tt.smell)
if tt.wantNil {
if pattern != nil {
@ailinter-dev

Copy link
Copy Markdown
Contributor

Closing as spam — not merged.

Reason: this account ('tomatotomata') matches an automated mass-PR pattern:

  • 235 PRs authored, 0 ever merged
  • 63 PRs in the last 48h across unrelated repos (winget-pkgs, rustfmt, meson, TransformerLens, bazel-skylib, seatunnel…)
  • One PR every ~8-12 min, all 'good first issue'-style patches (Codex CLI automation, see branch name)
  • Additionally, the AILINTER PR Check dogfood gate rejected this file: quality score 74/100 < 80 threshold (deep nesting, bumpy-road in new code, staticcheck SA5011s)

Issue #12 remains open for genuine contributors.

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.

Good First Issue: Improve test coverage for refactoring strategies

3 participants