Behind the scenes • Installation • Author • License
AutoLocalized scans your project and search for your localization files and project files containing localized keys. By using Rules and Validation methods ensuring your keys and files are organized, clean, and always up to date with your work.
I use this incedible framework https://github.com/pmd/pmd to help me find copy paste code.
For every code duplication found this package
- Shows the file origin, how many lines are copied and where.
To Do's:
- Use pmd to search for dead variables/functions .
- Add Wiki
- Finish README.md
- Add build and test pass marks
1. Install Homebrew
- after that run "brew install pmd" in terminal
2. AutoLocalized is available through SPM (Swift Package Manager). To install it, simply follow the next steps. Add AutoLocalized as a dependecy using SPM:
- File -> Swift Packages -> Add Package Dependency
3. Create a "New Run Script Phase" under you target in "Build Phases" tab and copy the script below.
xml_data=$(pmd cpd --files ${PROJECT_NAME} --minimum-tokens 50 --language swift --encoding UTF-8 --format xml --failOnViolation true)
SDKROOT=macosx
cd ~/Library/Developer/Xcode/DerivedData/${PROJECT_NAME}-*/SourcePackages/checkouts/AutoCopyPaste
swift run -c release AutoCopyPaste "${xml_data}"
- If you get an "error:invalid Access" error after building, just build agian it will go away. (SPM bug)
AlexPinhasov, alexp.software@gmail.com
AutoCopyPaste is available under the MIT license. See the LICENSE file for more info.