This repository was archived by the owner on Aug 12, 2026. It is now read-only.
JSON output: does it expose the full declaration range? (building a CI/removal helper on top) #1130
Unanswered
nenadvulic
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I'm putting together a small helper on top of Periphery, mostly CI ergonomics (only flagging the dead code a PR actually introduces) and, if it turns out doable, removing the unused declarations automatically with SwiftSyntax. A few things I wanted to check before going further.
Does the JSON output include the full source range of a declaration, or just the line/column of its name? For the removal part I need to know where the whole declaration starts and ends so I can cut it out cleanly and map it to a SwiftSyntax node. If it's only the name location right now, would you be open to a PR that adds the full range?
Also, is removing code something you'd ever want Periphery to do itself, or do you prefer to keep it detection-only? I don't want to push something against the grain — if it's out of scope that's totally fine, I'll just keep it in my own tool.
Last one, for CI: is there a good way to get only the results introduced against a base branch, instead of the whole
--baselinefile? Or is that meant to live in a wrapper?Thanks for the tool, by the way.
All reactions