refactor: simplify Grep.pm for readability#77
Open
Koan-Bot wants to merge 2 commits intometacpan:masterfrom
Open
refactor: simplify Grep.pm for readability#77Koan-Bot wants to merge 2 commits intometacpan:masterfrom
Koan-Bot wants to merge 2 commits intometacpan:masterfrom
Conversation
- Remove dead `update_match_counter` sub and its commented-out call - Remove stale POD design notes and commented-out debug `say` statements - Simplify `do_search`: remove unused variable destructuring - Extract output-parsing logic into `_parse_git_grep_output` method - Extract child process logic into `_run_child_git_grep` method - Fix variable shadowing: `$distro` → `$dist_name`, `$search` → `$path_pattern` - Remove unused variables: `@path` in cache_cleanup, `$gitdir` in _get_match_cache - Remove unused `Proc::ProcessTable` import - Remove redundant `exists` check in get_list_of_files_to_search - Clean up stale comments in grepcpan.pm Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Author
Quality Gate WarningTests failed: FAILED Auto-merge was skipped due to quality gate issues. |
The refactoring commit accidentally modified three CI workflow files: - build-deployment-container.yml: downgraded from buildx to simple docker build - build-production-container.yml: introduced typo "poduction" and downgraded ubuntu - testsuite.yml: removed concurrency settings and branch filter These changes were unrelated to the Grep.pm refactoring and caused test failures. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Author
Rebase: refactor: simplify Grep.pm for readabilityBranch Diff: 5 files changed, 139 insertions(+), 200 deletions(-) Review feedback was analyzed and applied. Actions
Automated by Kōan |
Member
|
@Koan-Bot rebase |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Simplify and clean up
GrepCpan::Grep(net -79 lines) and minor cleanup ingrepcpan.pm.Why
The mission spec identified several readability issues: dead code, long monolithic methods, variable shadowing, commented-out debug statements, and unused imports. This PR addresses all of them to make the codebase easier to navigate and maintain.
How
update_match_counter(marked "dead"), stale POD notes, ~15 commented-outsay/debug lines_do_searchoutput-parsing loop →_parse_git_grep_output;run_git_cmd_limitchild process block →_run_child_git_grep$distro→$dist_namein map block; inner$search→$path_patternin filetype loopProc::ProcessTableimport, unused$gitdirand@pathvariables, redundantexistscheckdo_search: removed unused variable destructuring that duplicated_do_searchTesting
metacpan-cpan-extracted-literepo)🤖 Generated with Claude Code
Quality Report
Changes: 2 files changed, 109 insertions(+), 188 deletions(-)
Code scan: clean
Tests: failed (FAILED)
Branch hygiene: clean
Generated by Kōan post-mission quality pipeline