3 ms·
This feels like something where the right solution is to drop down to the terminal and use the old standbys - sed/grep/find, etc. Could probably wrap it all up
by dangerlibrary 4y ago
This feels like something where the right solution is to drop down to the terminal and use the old standbys - sed/grep/find, etc. Could probably wrap it all up in `make` or `just` if this is something you do regularly.
- thangalin 4y agoIt's not trivial. Some class names are substrings of other classes. I'm pretty sure this requires loading and parsing the source code's AST to accomplish without breaking the build. The SO thread goes into more gnarly details.
- dangerlibrary 4y agoSorry, I didn't mean to imply it was trivial, by any means. Just that there are powerful tools for "manipulating many line-delimited text files at once" and those tools seem likely to fit your goal. It's possible you do in fact need to parse the AST for your goals - I haven't spent the requisite time to deeply understand the problem.