All Projects → PaulTaykalo → Swift Scripts

PaulTaykalo / Swift Scripts

Licence: mit
Some useful scripts for swift developers

Programming Languages

ruby
36898 projects - #4 most used programming language
swift
15916 projects

Unused

unused.rb Searches for unused swift functions, and variable at specified path

Usage

cd <path-to-the-project>
<path-to-unused.sh>/unused.rb 

Output

 Item< func loadWebViewTos [private] from:File.swift:23:0>
Total items to be checked 4276
Total unique items to be checked 1697
Starting searching globally it can take a while
 Item< func applicationHasUnitTestTargetInjected [] from:AnotherFile.swift:31:0>
 Item< func getSelectedIds [] from: AnotherFile.swift:82:0>

Xcode integration

In order to integrate this to Xcode just add Custom Build Phase/Run Script
~/Projects/swift-scripts/unused.rb xcode

Known issues:

  • Fully text search (no fancy stuff)
  • A lot of false-positives (protocols, functions, objc interoop, System delegate methods)
  • A lot of false-negatives (text search, yep)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].