-
Notifications
You must be signed in to change notification settings - Fork 121
[HACK WEEK] Integrate periphery #15962
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
ff0bcc7 to
758a187
Compare
c5d9d8d to
ad13050
Compare
09848fd to
1f4f250
Compare
1f4f250 to
a3ded2e
Compare
itsmeichigo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a novice when it comes to app infrastructure tasks so I'll refrain from reviewing this PR. I'm just curious where I can get the reports from Periphery after this setup? (pardon the dumb question)
You can go to the PR's Buildkite pipeline and check out the "Detect unused code" step. For example this is the one for this PR: https://buildkite.com/automattic/woocommerce-ios/builds/31502#019879ee-7dcd-453e-b5c2-1ed88921cf0f If there are any unused code entries, the build will fail and the output will contain smth like: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving to unblock, just left a suggestions of adding 2 flags to the periphery scan to improve the output
[EDIT] Actually implemented those suggestions myself in a separate PR so that you have all the options (merge this base PR independently and iterate on the other one later, or merge the other one in this one first if you like it before merging all to trunk… up to you)
Add --disable-update-check and --relative-results flags DRY some code to avoid repetition of the commands to run scan
|
@AliSoftware Thx for contributions. I'll wait for your PR before merging. |
@itsmeichigo Quick update: following some improvements we made in #15984, the CI job now also posts a Buildkite annotation to report any Periphery warnings (example here) 🎉 |

Description
Integrate Periphery to run on Buildkite CI. Follows the approach introduced here: pbzQyC-3OH-p2
.periphery.ymlsetup.Scripts/Periphery/periphery_baseline.jsonas filter list of existing legacy unused code issues.Scripts/Periphery/setup-and-run-periphery.shto prepare and use the Periphery installation.buildkite/commands/run-periphery.shas a Buildkite pipeline command.setup-and-run-periphery.shscan with--skip-buildto reuse the build artifact from the build step.buildkite/commands/build-for-testing.shstep to also upload theDerivedData/Index.noindex/DataStore/data store index for the Periphery.RELEASE-NOTES.txtif necessary.