DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to fix mechanical PHP findings in one pass with Sloppy

Let Rector and Pint fix the findings a machine can change, then review what is left.

Short answer: Commit or stash current work so the changes from the fix pass are easy to review; then run vendor/bin/sloppy to list the findings before fixing; run vendor/bin/sloppy fix to apply Rector, remove narrating comments and format with Pint. All steps.

Who it is forA PHP developer with a backlog of Sloppy findings who wants the mechanical ones cleared quickly.

The problemMechanical findings such as restating comments take time to fix by hand, while judgement-based findings still need a person.

The outcomeMechanical findings are fixed, formatting is applied, and a list of findings that still need a person remains.

What you need first

  • PHP 8.3 or newer
  • Composer
  • A PHP project with source roots listed in composer.json
  • Git, for diff and review commands

Steps

  1. Commit or stash current work so the changes from the fix pass are easy to review.
  2. Run vendor/bin/sloppy to list the findings before fixing.
  3. Run vendor/bin/sloppy fix to apply Rector, remove narrating comments and format with Pint. (inferred, check the README)
  4. Run vendor/bin/sloppy again and review the remaining findings that need a person.

Prompt for your agent

In the Heyosseus/sloppy project, run the fix command on the PHP repository at <project path>. Output the number of findings before and after the fix pass, and the findings that still need a person. Verify that the test suite of the project still passes after the fix.

Caveat. The fix pass changes code with Rector and Pint, so the project's own tests should be run after it, as the README does not promise the output is behaviour-preserving for every project.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for Heyosseus/sloppy and "Fix mechanical PHP findings in one pass"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer