Git Product home page Git Product logo

lsunusedresources's People

Contributors

dimohamdy avatar ligr avatar nathanwhy avatar pedrovieira avatar remlostime avatar sochalewski avatar tinymind avatar tinytoy avatar tomatoeggs avatar wangwanjie avatar wmellon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lsunusedresources's Issues

Mac systemVersion is macOS Sierrra 10.12.6,but can not build.

My Mac systemVersion is macOS Sierrra 10.12.6,when I run the project there is a issue appear.The description is "Storyboards are not available before macOS 10.10".Then I change macOS Deployment Target as 10.12,but still appear the same issue.why?What can I do?

会不会漏掉一些图片

for (NSString *path in resPaths) {
NSString *name = [path lastPathComponent];
if (!name.length) {
continue;
}

        NSString *keyName = [StringUtils stringByRemoveResourceSuffix:name];

        if (!tempResNameInfoDict[keyName]) {
            BOOL isDir = NO;
            ResourceFileInfo *info = [ResourceFileInfo new];
            info.name = name;
            info.path = path;
            info.fileSize = [FileUtils fileSizeAtPath:path isDir:&isDir];
            info.isDir = isDir;
            tempResNameInfoDict[keyName] = info;
       }

}

这段代码中可能存在path不同但[path lastPathComponent];相同的图片,比如在不同的子工程中,后者就不会加到字典中。

Default regex wrongly to handle string contains ""

The default regex "(.+?)" for .swift/.m .etc handles string like :

Checkbox(checked: true, titleSelected: "", titleNormal: "", imageSelected: UIImage(named: "cart_agree_checked"), imageNormal: UIImage(named: "cart_agree_unchecked"))

wrongly.
Suggest to use "(.*?)" instead. @tinymind

Exclude feature is not working

I can not get the Exclude work with my project.
I use Carthage for embedding libraries and since I do not want images from different libraries listed as unused resources, I would want to exclude that.

Thank you for your work!

app crash

In the method - (IBAction)onDeleteButtonClicked:(id)sender

[self.resultsTableView removeRowsAtIndexes:indexSet withAnimation:NSTableViewAnimationSlideUp]; might be crash. Off the top of my head, it happens a lot when the picture is not in the images.xassets

False positives

I have false positives because of .realm files and because I have in my project a complex concatenating algorithm:

title_subtitle_category1

But I guess for that - no tool could do a great job.

Thank you,

一个小问题

如果我的代码被注释掉了,比如说

// UIImage *image = [UIImage imageNamed:@"test"];

这样test这个图片会算作unused吗?

Automation

Any ideas on how this could be automated?

Doing checks like this on every build in Xcode with warning messages etc might be overkill and a performance hog, but maybe if this were a command line tool or would be usable as an action in Fastlane. The action could have settings to allow builds to fail or just generate warnings about unused assets.

Images in Plist

My app references images for 3D Touch shortcut options in the Plist
ie for the property
UIApplicationShortcutItemIconFile

Those images came back as not used in this app, but they indeed are used. Great app btw.

Commented code

Maybe this has been dealt with before, but it seems that commented out code causes an image to be deemed used. Not sure if feature or not.

一点也不准

我收索到的图片还使用呢,结果也收索出来了

False positives due to SwiftGen provided assets

We have image assets that are referenced in code as Asset.imageName.image. The list of image assets is generated using SwiftGen using the following command as a build phase:

 swiftgen images "$PROJECT_DIR/appname/Assets.xcassets" -t swift3 \
--output "$PROJECT_DIR/appname/Constants/Images.swift"

If LSUnusedResources had access to Images.swift it would have the mapping between image filename and code Asset.imageName:

enum Asset: String {
  case bgBluetooth = "bg-bluetooth"
  case addFab = "add_fab"
  case arrowRight = "arrow_right"
  case batteryLow = "battery_low"
 ....

And then LSUnusedResources could search the source code for "Asset." and then for one of image names.

why ignore

// ignore if the resource file is in xxx/xxx.imageset/; xx/LaunchImage.launchimage; xx/AppIcon.appiconset; xx.bundle/xx
image

Maybe there are more unused image in *.imageset or bundle/, why did you ignore?

误删问题

为什么我找出来的资源文件全部都是占用着的文件?
image
再提个bug,为什么我在Setting的Resource中设置了imageset之后,再想改为png或是其他类型文件都不管用了?始终是搜索imageset。重启才初始化。

How to ignore image names with specific suffixes?

My app has the night mode, it will automatically find the image name with the suffix "_night" when the user opens night mode.
So how to ignore these images?

你好,我们应用有夜间模式,会自动找到带有 "_night" 的图片而不是写在源代码中,这导致大量 "_night" 的非预期结果出现,使得无法正常筛选排除无用图片,有没有什么方法可以忽略特定后缀的图片呢?或者应该改进源代码的功能?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.