Compare commits
3 Commits
b7899ace41
...
4e536e5859
Author | SHA1 | Date | |
---|---|---|---|
4e536e5859 | |||
79b75dc165 | |||
ce46cec191 |
|
@ -159,16 +159,6 @@ For code tasks:
|
||||||
1. Create a plan for how to solve the issue.
|
1. Create a plan for how to solve the issue.
|
||||||
2. Write unit tests that proves that your solution works.
|
2. Write unit tests that proves that your solution works.
|
||||||
3. Then, solve the issue by writing the required code.
|
3. Then, solve the issue by writing the required code.
|
||||||
|
|
||||||
# Code Quality Pass
|
|
||||||
|
|
||||||
4. Perform a code quality pass to ensure all conventions from CONVENTIONS.md are followed and that ruff reports no issues. Improve code quality by adding early error validation, enforcing strict behavior, and avoiding code duplication.
|
|
||||||
|
|
||||||
Key focus areas:
|
|
||||||
- Dataclasses should be marked frozen.
|
|
||||||
- Re-use functions to avoid code duplication.
|
|
||||||
- Add early error validation.
|
|
||||||
- Enforce strict behavior.
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
MODEL = None
|
MODEL = None
|
||||||
|
@ -390,6 +380,14 @@ def solve_issue_in_repository(
|
||||||
)
|
)
|
||||||
return IssueResolution(False)
|
return IssueResolution(False)
|
||||||
|
|
||||||
|
# Code quality pass: ensure ruff passes
|
||||||
|
if not run_cmd(['bash', '-c', 'ruff check .'], tmpdirname, check=False):
|
||||||
|
logger.info('Code quality issues detected, invoking aider to fix lint...')
|
||||||
|
run_cmd(create_aider_command(issue_content), tmpdirname, check=False)
|
||||||
|
run_cmd(['bash', '-c', RUFF_FORMAT_AND_AUTO_FIX], tmpdirname, check=False)
|
||||||
|
run_cmd(['git', 'add', '.'], tmpdirname)
|
||||||
|
run_cmd(['git', 'commit', '-m', 'Aider lint fixes'], tmpdirname, check=False)
|
||||||
|
|
||||||
# Push changes
|
# Push changes
|
||||||
return push_changes(
|
return push_changes(
|
||||||
repository_config,
|
repository_config,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user