jeffhodnett / Unused

A Mac app for checking Xcode projects for unused resources
1.38k stars 184 forks source link

Tweaks and fixes #5

Closed 4ndrey closed 11 years ago

4ndrey commented 11 years ago

Hi!

First of all thanks for sharing your code. I found it very useful! Although in original state it doesn't work for me :( I found some drawbacks, namely: 1) your code supposes that all images appear in files with extension, but methods like imageNamed: work well without extensions. [critical issue] 2) lack of support for scanning plist (but I think it would be very convenient, for example Info.plist) [enhancement] 3) using some benchmarking I found that your core scanning exec command via "find ... -exec" is 3x slower than simple pipe construction, i.e. "cat file | grep -o imageName" [enhancement] 4) also I propose trying to filter image names like: "Section_0.png", "Section1.png", etc. These image names can possibly be created in code by [NSString stringWithFormat:@"Section%d", (int)] constructions and not by its original file names. So I made tricky implementation of this feature (NB: it can be turned off by SHOULD_FILTER_ENUM_VARIANTS define) [new feature].

To sum up I implemented above points and if you will find it useful and correct — please include it in your original repository. Thanks!

jeffhodnett commented 11 years ago

Excellent work!

Thanks for the improvements. I'll be adding some of my own next week. The only minor issue for me is the regex update https://github.com/4ndrey/Unused/commit/3e8872cf0f6254227492c6a4cada1a1434ebc1d4 but will add it and review performance.

Thanks again!

4ndrey commented 11 years ago

No problem! Thank you too for fast response! I will follow your project with interest! ;)