bento
bento copied to clipboard
Support and respect underlying tool's `--fix` feature
Proposal is to respect, where possible, a tool's underlying fixes. Related ask from a user:
I also wouldn't mind a way to apply changes (kind of like python's
2to3converts files).
Honestly https://libcst.readthedocs.io is way better than 2to3 for enabling this feature. See https://github.com/returntocorp/r2c-authentication-checks/pull/4 for previous work!
@ulziibay unfortunately libCST only supports python 3.5+ as input, so it couldn't do 2to3 workflow
User comment:
- There were some things that would be nice to fix, but would be a pain to go through and manually fix them. Ex: == vs ===. Would be nice to have something like tslint's tslint --fix.
Spatch can also implement easily many autofixes. See https://github.com/facebookarchive/pfff/wiki/Spatch I have a version that can work on many languages that is similar to the recent paper by claire Goues on parser combinators for program transformation.