Skip to content

pgrep: optimize length detection#636

Open
Franklin-Qi wants to merge 1 commit intouutils:mainfrom
Franklin-Qi:fix-bug#635-optimize-length-detection
Open

pgrep: optimize length detection#636
Franklin-Qi wants to merge 1 commit intouutils:mainfrom
Franklin-Qi:fix-bug#635-optimize-length-detection

Conversation

@Franklin-Qi
Copy link
Contributor

@Franklin-Qi Franklin-Qi commented Feb 16, 2026

When calculating the length, the ^$ character needs to be removed if the -x parameter is present.

Closes: #635

@codecov
Copy link

codecov bot commented Feb 16, 2026

Codecov Report

❌ Patch coverage is 0% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 18.76%. Comparing base (6ac0e01) to head (961f167).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
src/uu/pgrep/src/process_matcher.rs 0.00% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #636      +/-   ##
==========================================
- Coverage   18.77%   18.76%   -0.02%     
==========================================
  Files          66       66              
  Lines        9752     9758       +6     
  Branches      516      518       +2     
==========================================
  Hits         1831     1831              
- Misses       7921     7927       +6     
Flag Coverage Δ
macos_latest 6.90% <0.00%> (-0.02%) ⬇️
ubuntu_latest 19.12% <0.00%> (-0.02%) ⬇️
windows_latest 0.02% <0.00%> (-0.01%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

@Franklin-Qi Franklin-Qi force-pushed the fix-bug#635-optimize-length-detection branch 2 times, most recently from f72660e to 2f41da0 Compare February 16, 2026 03:40
When calculating the length, the ^$ character needs to be removed if the -x parameter is present.

Closes: uutils#635
@Franklin-Qi Franklin-Qi force-pushed the fix-bug#635-optimize-length-detection branch from 2f41da0 to 961f167 Compare February 16, 2026 03:49
@Krysztal112233
Copy link
Collaborator

Krysztal112233 commented Feb 16, 2026

could you please add some unittest to test your modification and make sure no regression if possible?

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.

The pgrep -x command will report an error message when performing a length check.

2 participants