Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/PaulTaykalo/swift-scripts
Some useful scripts for swift developers
https://github.com/PaulTaykalo/swift-scripts
legacy-code ruby swift unused
Last synced: 3 months ago
JSON representation
Some useful scripts for swift developers
- Host: GitHub
- URL: https://github.com/PaulTaykalo/swift-scripts
- Owner: PaulTaykalo
- License: mit
- Created: 2017-10-20T10:14:02.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-02-08T10:07:08.000Z (9 months ago)
- Last Synced: 2024-07-18T20:46:28.811Z (4 months ago)
- Topics: legacy-code, ruby, swift, unused
- Language: Ruby
- Size: 91.8 KB
- Stars: 923
- Watchers: 27
- Forks: 203
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Unused
`unused.rb` Searches for unused swift functions, and variable at specified path## Usage
```
cd
/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`
![](https://user-images.githubusercontent.com/119268/32348473-88080ed2-c01c-11e7-9de6-762aeb195156.png)
![](https://user-images.githubusercontent.com/119268/32348476-8af3a700-c01c-11e7-893f-013851568882.png)## 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)