Skip to content

CXH-1889: replace WriteString(fmt.Sprintf) with fmt.Fprintf and add nil guard - #26

Merged
luisina-santos merged 5 commits into
mainfrom
luisinasatos/fix-ci
Jul 1, 2026
Merged

CXH-1889: replace WriteString(fmt.Sprintf) with fmt.Fprintf and add nil guard#26
luisina-santos merged 5 commits into
mainfrom
luisinasatos/fix-ci

Conversation

@luisina-santos

Copy link
Copy Markdown
Contributor

Summary

  • Replace sb.WriteString(fmt.Sprintf(...)) calls with fmt.Fprintf(&sb, ...) in client.go and client_test.go to fix revive unhandled-error lint failures
  • Add c.client != nil guard in connector.go before calling IsVersion8() to prevent a nil pointer dereference

Test plan

  • golangci-lint run ./... reports 0 issues
  • go build ./... succeeds
  • go test ./... passes (7 tests)
  • CI passes

🤖 Generated with Claude Code

Fixes revive unhandled-error lint failures and a nil pointer dereference
when c.client is nil before IsVersion8() is called.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@luisina-santos
luisina-santos requested a review from a team June 26, 2026 13:52
@luisina-santos luisina-santos changed the title fix: replace WriteString(fmt.Sprintf) with fmt.Fprintf and add nil guard CXH-1889: replace WriteString(fmt.Sprintf) with fmt.Fprintf and add nil guard Jun 26, 2026
@linear-code

linear-code Bot commented Jun 26, 2026

Copy link
Copy Markdown

CXH-1889

luisina-santos and others added 2 commits June 26, 2026 10:58
These files are required by the Generate Baton Metadata CI workflow to
validate that committed metadata matches the binary output.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Required by the Generate Baton Metadata CI workflow — the docs freshness
check requires docs/connector.mdx to be present and updated whenever
baton_capabilities.json changes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Connector PR Review: CXH-1889: replace WriteString(fmt.Sprintf) with fmt.Fprintf and add nil guard

Blocking Issues: 0 | Suggestions: 0 | Threads Resolved: 0
Criteria: loaded .claude/skills/ci-review.md from trusted base 6ea3bae
Review mode: incremental since f22e8ae
View review run

Review Summary

The full PR diff was scanned for security and correctness. The new commit only refined docs/connector.mdx to show a comma-separated example and to describe BATON_EXPAND_COLUMNS as a comma-separated list, matching the stringSliceField config. The underlying code changes (sb.WriteString(fmt.Sprintf) becoming fmt.Fprintf in pkg/client/client.go, and the c.client != nil guard in pkg/connector/connector.go) are semantically equivalent and correct: the string verb still treats values as literal arguments, and the nil guard is a safe defensive check. No new issues found.

Security Issues

None found.

Correctness Issues

None found.

Suggestions

None.

@github-actions github-actions Bot 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.

No blocking issues found.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@github-actions github-actions Bot 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.

No blocking issues found.

Comment thread docs/connector.mdx Outdated
@btipling btipling removed their assignment Jun 29, 2026
expand-columns is a string slice like skip-database; show a
comma-separated example and note it in the description.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@github-actions github-actions Bot 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.

No blocking issues found.

@luisina-santos
luisina-santos merged commit 824a06c into main Jul 1, 2026
11 checks passed
@luisina-santos
luisina-santos deleted the luisinasatos/fix-ci branch July 1, 2026 13:02
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.

4 participants