Coder Social home page Coder Social logo

flohei / abandoned-strings Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ijoshsmith/abandoned-strings

0.0 2.0 1.0 20 KB

Command line program that detects unused resource strings in an iOS or OS X application.

License: MIT License

Swift 100.00%

abandoned-strings's Introduction

Abandoned Resource String Detection

This command line program detects unused resource strings in an iOS or OS X application.

Updated to Swift 3, thanks to @astaeck on Oct-17-2016

Usage

Open a Terminal to the directory which contains the AbandonedStrings executable, and run the following command:

$ ./AbandonedStrings /Users/your-username/path/to/source/code

What to expect

If a .strings file contains…

"some_string_identifier" = "Some Display Text";

…this program will consider that resource string to be abandoned if…

"some_string_identifier"

…is not found in any of the source code files (namely, files with a .h, .m, .swift or .jsbundle extension).

More details

This program searches through the source code files in an iOS app project, looking for resource strings (in a .strings file) whose identifiers are not referenced by the application's source code.

The search logic does not take into account if code is commented out, so it won't be as reliable if your application has a lot of commented-out code.

It also does not try to determine the context in which string identifiers are used, such as whether or not the string is being used to look up a localized string value or if it just happens to match a resource string identifier by coincidence.

Also, this program is ineffective if resource string identifiers are referenced via constants or dynamically constructed.

Disclaimer

As noted above, this program uses a simple heuristic and is not guaranteed to produce perfect results for every codebase.

abandoned-strings's People

Contributors

ijoshsmith avatar xaphod avatar devsc avatar hlung avatar sterlingwes avatar

Watchers

Florian Heiber avatar James Cloos avatar

Forkers

cyberbeni

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.