Skip to content

Removed: Delete dead-code utilities from util.rs#99

Merged
Sewer56 merged 1 commit intomainfrom
tighten-public-api
Apr 10, 2026
Merged

Removed: Delete dead-code utilities from util.rs#99
Sewer56 merged 1 commit intomainfrom
tighten-public-api

Conversation

@Sewer56
Copy link
Copy Markdown
Member

@Sewer56 Sewer56 commented Apr 10, 2026

Summary

  • Remove format_numbered_line and truncate_text from llm-coding-tools-core/src/util.rs - both were only referenced in their own test block, never used in production code
  • Remove LIKELY_CHARS_PER_LINE_MAX constant - zero references anywhere in the codebase
  • Remove the associated test cases for the deleted functions

- Remove `format_numbered_line` and `truncate_text` (only used in own tests)
- Remove `LIKELY_CHARS_PER_LINE_MAX` (zero references)
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 10, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 63ae102c-a3d6-4ab1-b6ec-b7df51040a06

📥 Commits

Reviewing files that changed from the base of the PR and between 7ca279e and a0d2028.

📒 Files selected for processing (1)
  • src/llm-coding-tools-core/src/util.rs
💤 Files with no reviewable changes (1)
  • src/llm-coding-tools-core/src/util.rs
📜 Recent review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (12)
  • GitHub Check: Semver Checks (Core Blocking)
  • GitHub Check: Semver Checks (Core Blocking+Linux)
  • GitHub Check: Semver Checks (Serdesai Full)
  • GitHub Check: Semver Checks (Core Async+Linux)
  • GitHub Check: Semver Checks (Core Async)
  • GitHub Check: Semver Checks (Serdesai Full+Linux)
  • GitHub Check: Async Windows
  • GitHub Check: Async Linux
  • GitHub Check: Async macOS
  • GitHub Check: Blocking Windows
  • GitHub Check: Blocking macOS
  • GitHub Check: Blocking Linux

Walkthrough

This pull request removes three public exports from the utility module: the constant LIKELY_CHARS_PER_LINE_MAX and two public functions format_numbered_line(...) and truncate_text(...). The underlying truncation functionality is preserved through the existing pub(crate) truncate_line_with_ellipsis(...) function. Unit tests were updated to cover this internal function instead of the removed public utilities. No changes were made to the implementation of truncate_line_with_ellipsis itself. The overall change removes 64 lines of code from src/llm-coding-tools-core/src/util.rs.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: removing dead-code utility functions from util.rs, which matches the changeset exactly.
Description check ✅ Passed The description provides a clear summary of what was removed and why (unused in production), though it doesn't follow the template structure with contributing guidelines reference.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch tighten-public-api

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.38%. Comparing base (7ca279e) to head (a0d2028).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #99   +/-   ##
=======================================
  Coverage   81.37%   81.38%           
=======================================
  Files         108      108           
  Lines        4479     4469   -10     
=======================================
- Hits         3645     3637    -8     
+ Misses        834      832    -2     
Flag Coverage Δ
async 80.63% <ø> (+<0.01%) ⬆️
blocking 59.03% <ø> (-0.12%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/llm-coding-tools-core/src/util.rs 92.59% <ø> (-2.01%) ⬇️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Sewer56 Sewer56 merged commit bf957df into main Apr 10, 2026
22 checks passed
@Sewer56 Sewer56 deleted the tighten-public-api branch April 10, 2026 23:50
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.

1 participant