shisho icon indicating copy to clipboard operation
shisho copied to clipboard

Overwriting files with suggested changes

Open lmt-swallow opened this issue 3 years ago • 0 comments

Problem

Currently Shisho reports suggested changes, but it can't replace files with the changes automatically.

Possible Solutions

It'd be great if we could overwrite files automatically with --overwrite option, for example.

# example
shisho find "len(:[X])" --lang=go --rewrite "len(f(:[X]))" --overwrite

Additional Notes

Shisho may suggest multiple changes for a single file when different rules match for a single file. This behaviour may cause some implementation challenges.

lmt-swallow avatar Aug 20 '21 08:08 lmt-swallow