Open rattrayalex-stripe opened 7 years ago
I agree! I wonder whether this might be difficult with many thousands of modified files, though.
Difficult or annoying? 😉
Perhaps display "... and 1337 others"
when n > 100 ?
Though if you're using codemod
to go line-by-line through thousands of files... you might appreciate this even more / it's a small price to pay?
This seems helpful. I have a pretty clear idea of how to handle this cleanly. I'll open my PR once https://github.com/facebook/codemod/pull/90 is merged.
I am imagining:
<run codemod>
"Would you like to see a list of modified (and ignored files)?"
"y = yes, n = no, m = modified only"
<newline separated list, uses the `n > 100` rule Alex mentioned>
"y = yes, n = no, m = modified only"
maybe could be
"y = yes, n = no, m = modified only, c = clipboard"
where clipboard
copies the entire (including n > 100) to the clipboard. I'd rather put it into a file but can't think of a good way for this to happen easily.
I am imagining the list will sometimes go into a changelog file, github comment, slack channel message, or similar.
It could also be good to instead have
"y = yes, n = no, m = modified only", i = ignored only
since it is easy to infer the modified files from the commit, but it is not possible to infer the ignored files. They are likely to be a smaller list, and may be valuable to include in a commit message or similar.
Just 2c, take with a grain of salt – I haven't actually used codemod much myself 😄
It would be helpful to be able to quickly review the paths of the files which had changed and which had been ignored.