Skip to content

Use push for single char in mcp truncate to satisfy newer clippy - #1736

Merged
1jehuang merged 1 commit into
1jehuang:masterfrom
SiavZ:fix/clippy-single-char-push-str
Oct 8, 2026
Merged

1jehuang merged 1 commit into
1jehuang:masterfrom
SiavZ:fix/clippy-single-char-push-str

Conversation

@SiavZ

@SiavZ SiavZ commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

A newer clippy flags out.push_str("…") at crates/jcode-app-core/src/tool/mcp.rs:49 with clippy::single_char_add_str, which fails the Quality Guardrails job (-D warnings) on every PR, including ones that do not touch this file.

This replaces it with out.push('…'). Behavior is identical. It is the only occurrence of the pattern on master.

Verified locally with cargo clippy -p jcode-app-core --lib -- -D warnings (exit 0).

@greptile-apps

greptile-apps Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Low risk] Updates string truncation to use a different method.

Safe to merge. The change preserves description-clipping behavior and satisfies the Clippy guardrail.

What we checked:

  • Verified the exact-source function parity across 87 cases and confirmed all outputs matched byte-for-byte. T-Rex
  • Compared the parity results with the existing test output and prepared the requested Clippy head output for comparison. T-Rex
  • Noted cargo emitted setup warnings about profile-package mismatches, but none of the commands failed during validation. T-Rex
  • Assembled and linked the full set of authored command scripts, Rust harnesses, source captures, compilation results, and execution outputs into a traceable artifact suite for review. T-Rex

Summary

Replaces out.push_str("…") with out.push('…') in clip_description to satisfy newer Clippy.

  • Both implementations produced identical output across 87 cases covering Unicode, whitespace, and clipping boundaries.
  • The existing description-clipping test passed.
  • cargo clippy --locked -p jcode-app-core --lib -- -D warnings passed with exit code 0.
  • No actionable issues or rule violations found. Safe to merge.

Reviews (1) · Last reviewed commit: "Use push for single char in mcp truncate..."

@1jehuang
1jehuang merged commit 6961272 into 1jehuang:master Oct 8, 2026
9 of 12 checks passed
1jehuang added a commit that referenced this pull request Oct 8, 2026
…#1740)

#1736 and #1739 covered the mcp.rs lint and commands_tests.rs format.
This handles the rest:
- google login: use is_multiple_of (manual_is_multiple_of)
- tui: gate a test-only copy helper and import, drop a needless mut
- rustfmt the openai-runtime drift reported by hosted CI
@1jehuang

1jehuang commented Oct 8, 2026

Copy link
Copy Markdown
Owner

Merged, thank you! The rest of #1740 is going in via #1764.

--- — Jcode agent (automated triage), on behalf of @1jehuang

1jehuang added a commit that referenced this pull request Oct 8, 2026
…#1740)

#1736 and #1739 covered the mcp.rs lint and commands_tests.rs format.
This handles the rest:
- google login: use is_multiple_of (manual_is_multiple_of)
- tui: gate a test-only copy helper and import, drop a needless mut
- rustfmt the openai-runtime drift reported by hosted CI
@SiavZ
SiavZ deleted the fix/clippy-single-char-push-str branch October 15, 2026 18:46
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