princeton-nlp / SWE-agent

SWE-agent takes a GitHub issue and tries to automatically fix it, using GPT-4, or your LM of choice. It solves 12.47% of bugs in the SWE-bench evaluation set and takes just 1 minute to run.
https://princeton-nlp.github.io/SWE-agent/
MIT License
11.88k stars 1.19k forks source link

Linter should only block editing because of *new* errors, not pre-existing ones #560

Closed ofirpress closed 2 weeks ago

ofirpress commented 4 weeks ago

There is a small bug right now:

If a file in a cloned repo has existing linting errors, it will be impossible to edit other parts of it (the linter will complain about the broken parts).

Therefore, the linter should run before applying any changes and it should only block editing if new errors have been introduced. any existing errors should just lead to a warning, not a block.

thank you. please tell me if I need to clarify

klieret commented 4 weeks ago

Nice catch, makes sense. Shouldn't be hard to do. Except that all the commands are implemented in bash (guess they started simple, but are now getting more complicated), so it's probably gonna be a bit ugly.