woshiccm / Pecker

CodePecker is a tool to detect unused Swift code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Document BUILD_ROOT when running from command line

noahsark769 opened this issue · comments

Pecker currently requires the BUILD_ROOT environment variable to be set, if an index store path is not passed. Without a BUILD_ROOT, it fails silently. It would be good to document that this is required as an env var.

In an ideal world, we could also provide the user a commend line option to specify the name of the target - then we could infer a default DerivedData path to use for the IndexDB

commented

Thanks, will improve it

i got confused why it;s not working from command line. Thank you!

commented

ProcessInfo().environment["BUILD_ROOT"] get buildRoot, then get the index path in DerivedData

commented

屏幕快照 2019-12-16 上午11.07.32.png

commented

For example, if I have two same name projects, can't determine exactly which is correct in DerivedData, means can't get the correct index of project.

Hm interesting - I guess specifying the name of the target isn't an option then. It would still be nice to have better error messaging for this, and another option would be to allow input of the directory via a command line argument

commented

Yeah, will improve as soon as possible