OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

[Feature]: Enable Automatic Linting After File Edits

Open openhands-agent opened this issue 11 months ago • 2 comments

What problem or use case are you trying to solve?
The goal is to implement an automated linting feature that executes whenever a file edit is made. This aims to catch errors earlier in the development process to improve accuracy and efficiency.

Describe the UX of the solution the user wants
Automatically run a linter script, such as openhands_lint.sh, after every file edit if the script exists.

User's thoughts on the technical implementation?
The approach could leverage existing configurations used by developers, such as the pre-commit-config.yml, to ensure consistency between human and automated edits.

Describe the alternatives considered
Catch errors at the commit stage was considered, but executing the linting post-edit is more advantageous to catch errors sooner.

Additional context
This feature will align with existing practices, like the swe-agent using flake8 for Python files, which currently rejects edits not passing lint checks.

Issue Created By: Graham Neubig on Slack

Link to Slack Thread: Slack Thread

openhands-agent avatar Jan 14 '25 10:01 openhands-agent

https://github.com/All-Hands-AI/OpenHands/issues/6296

ryanpeach avatar Feb 11 '25 19:02 ryanpeach

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Mar 14 '25 02:03 github-actions[bot]

This issue was closed because it has been stalled for over 30 days with no activity.

github-actions[bot] avatar Mar 21 '25 02:03 github-actions[bot]