peripheryapp / periphery

A tool to identify unused code in Swift projects.
MIT License
5.02k stars 178 forks source link

Baseline usage help #759

Open aiKrice opened 1 week ago

aiKrice commented 1 week ago

Hello @manicmaniac, first of all, great job ! I'm trying the baseline feature but I don't understand how it works. I generate my baseline like this:

periphery scan --project Shopmium.xcodeproj --schemes ShopmiumSandbox --targets Shopmium 
--index-store-path ~/Library/Developer/Xcode/DerivedData/Shopmium-hjwfjrzwnoolqiatozxkypaeyhsh/Index.noindex/DataStore 
--write-baseline baseline --format json

It work fine, I can see my baseline file full of my warnings

Now I want to apply it I ran :

periphery scan --project Shopmium.xcodeproj --schemes ShopmiumSandbox --targets Shopmium 
--index-store-path ~/Library/Developer/Xcode/DerivedData/Shopmium-hjwfjrzwnoolqiatozxkypaeyhsh/Index.noindex/DataStore
 --baseline baseline --format json

But it doesn't do anything. Am I wrong ?

manicmaniac commented 1 week ago

@aiKrice

Hello @manicmaniac, first of all, great job !

Oh, I'm not the author of this product 😅

@ileitch deserves the praise.

aiKrice commented 1 week ago

Oh GG to @ileitch . My point is still valid anyway 👍

aiKrice commented 2 days ago

Nudge @ileitch :)

ileitch commented 2 days ago

Why are you using the --index-store-path option? Does the generated baseline file contain anything?