

GitHub - ijoshsmith/abandoned-strings: Command line program that detects unused...
source link: https://github.com/ijoshsmith/abandoned-strings
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md
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.
Recommend
-
109
README.md volkswagen Volkswagen detects when your tests are being run in a CI server, and makes them pass.
-
14
Escaping strings for use at any command line 2011-07-15 by qntm Okay, I have finally su...
-
9
Copy link Contributor ABouttefeux commented
-
11
log4j-detector Detects vulnerable log4j versions on your file-system within any application. It is able to even find instances that are hidden several layers deep. Works on Linux, Windows, and Mac, and everywhere else Java runs, too!...
-
6
C++ Program to Concatenate Two StringsC++ Program to Concatenate Two Strings30 Views03/06/2022In this video we will see a program to conca...
-
10
C Program to Sort an array of names or stringsSkip to content
-
9
Java Program to Check if Strings are Rotations of each other or notJava Program to Check if Strings are Rotations of each other or not90 Views13/07/2022
-
7
C Program to Concatenate Two StringsC Program to Concatenate Two StringsHello everyone. Welcome to the gig for geeks. My name is Erin
-
12
CPP Program to Check if Two Strings are AnagramsCPP Program to Check if Two Strings are Anagrams40 Views18/07/2022In this video, w...
-
13
Java Program to Print all Interleavings of given Two StringsSkip to content
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK