Skip to content

refactor: extract fix command utilities from src/index.ts to src/utils/fix-runner.ts (#437)#441

Closed
AnupamKumar-1 wants to merge 1 commit into
OWASP:mainfrom
AnupamKumar-1:refactor/extract-fix-command-utilities
Closed

refactor: extract fix command utilities from src/index.ts to src/utils/fix-runner.ts (#437)#441
AnupamKumar-1 wants to merge 1 commit into
OWASP:mainfrom
AnupamKumar-1:refactor/extract-fix-command-utilities

Conversation

@AnupamKumar-1
Copy link
Copy Markdown
Contributor

Closes #437

Summary

Moved three fix command utility functions from src/index.ts to a new dedicated module src/utils/fix-runner.ts.

What changed

  • Created src/utils/fix-runner.ts with exported functions
  • Moved buildFixCommandParts, runInstallCommand, commandLabelForPackageManager
  • Updated src/index.ts to import from ./utils/fix-runner.js

Validation

  • npm run build
  • npm test — 326/326 tests passed

User-facing impact

  • affect scanning behavior
  • affect output formatting
  • affect JSON output
  • affect docs only

Notes

Pure refactor — no logic changes, no side effects.

@sonukapoor
Copy link
Copy Markdown
Collaborator

Thanks for the PR! #442 was opened for the same issue (#437) and does the same refactor with a couple of extra cleanups - it removes the now-unused SuggestedFixTarget and Finding imports from index.ts, and avoids the orphaned blank line at the top of the file where spawn was. We're going to go with that one. Would you mind closing this PR? Appreciate the contribution.

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.

refactor: extract fix command utilities from src/index.ts to src/utils/fix-runner.ts

2 participants