periphery icon indicating copy to clipboard operation
periphery copied to clipboard

advice on quickly making changes?

Open skydivedan opened this issue 5 months ago • 0 comments

so the output of periphery looks like this:

/Users/me/Documents/myproject/Sources/someStruct.swift:10:15: warning: Struct 'SomeStruct' is declared public, but not used outside of ...
/Users/me/Documents/myproject/Sources/someStruct2.swift:10:15: warning: Struct 'SomeStruct2' is declared public, but not used outside of ...

I've got about 500 instances of various structs, classes, enums & funcs that really don't need to be public, and the most likely fix is to just remove public from the declaration.

Now, I realize that this may cause issues with some things, and there may be some errors generated if I just removed all the public from the offending code. But my guess is that there will be few errors, and just removing public in these case will mostly work.

So, I was wondering if there is some sort of tool that can look at output like this, where it has a full path with line numbers, and then just make a change to those text files (in my case, deleting public).

Or, do I just need to write my own shell script to do this?

Thanks for any advice.

skydivedan avatar Jun 03 '25 02:06 skydivedan