ehmatthes / ehmatthes/py-bugger

Defer writing changes until all bugs are generated.

Open
#63 0 comments 0 reactions 0 assignees View on GitHub
1.0 release
Dominant language
Python
Stars
41
Forks
22
PR merge metrics
No merged PRs in 30d

Description

Currently, all bugs are written as soon as they are created. This has supported initial functionality, but creates at least two significant problems:

- Any bug that affects parsing means CST parsing fails from that point forward.
- `--dry-run` is more difficult to implement

The `modifications` list makes it much easier to simply generate a list of bugs, and then write those bugs once all bugs have been generated. All bugs are created based on the working state of the user's codebase.

- [ ] Keep the list of modifications as is.
- [ ] Remove code from buggers that writes bugs to files.
- [ ] Add a loop over modifications that writes all modifications that were generated.
- [ ] Make sure multiple modifications aren't made to the same line of code.
- [ ] Review logic around this, particularly between CST checking regex based bugs, and regex based bugs checking CST based bugs.
- [ ] Write tests that verify this behavior.
- [ ] Should be able to remove code that sorts list of requested bugs to ensure CST parsing happens first.
- [ ] Merge
- [ ] Release, as the removal of sorting makes for a better external bug making algorithm.
- [ ] Announce.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.