Created
August 6, 2015 20:59
-
-
Save DougFischer/12c764cf42f6c08993a0 to your computer and use it in GitHub Desktop.
Xcode post build script to display a warning suggesting class refactors when your code has more than 600 lines.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| find "${SRCROOT}" \( -name "*.h" -or -name "*.m" \) -and \( -path "${SRCROOT}/Pods/*" -prune -o -print0 \) | xargs -0 wc -l | awk '$1 > 600 && $2 != "total" {for(i=2;i<NF;i++){printf "%s%s", $i, " "} print $NF ":1: warning: File more than 600 lines (" $1 "), consider refactoring." }' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment