This is where your explain when the project started, for which client, and list all devteams who contributes to it.
- John Foo - position - City (Country)
- Bar Doe - position - City (Country)
Hooks are plugins which can be launch by git, on a special event.
The commit-msg hook, if defined, is launched when user want commit
It's a git-enforced policy, used in entreprise to force dev to correctly format their commit messages
Here is a custom commit-msg hook which looks for a format like these both:
| #!/bin/sh | |
| # author: julien gdt | |
| # regex='^[\[](ADD|IMP|FIX)[\]]' | |
| # regexjira='^[\[]JIRA[\]][[:space:]][\#][0-9]' | |
| # regexversion='^Version[[:space:]][0-9]\.[0-9]\.[0-9][[space:]][a-zA-Z]{3,}' | |
| var=`head -n 1 "$1"` | |
| function info |
| extension UIApplication { | |
| class func appVersion() -> String { | |
| return NSBundle.mainBundle().objectForInfoDictionaryKey("CFBundleShortVersionString") as! String | |
| } | |
| class func appBuild() -> String { | |
| return NSBundle.mainBundle().objectForInfoDictionaryKey(kCFBundleVersionKey as String) as! String | |
| } |
| # Created by https://www.gitignore.io/api/carthage,objective-c,swift,xcode,osx | |
| ### Carthage ### | |
| # Carthage - A simple, decentralized dependency manager for Cocoa | |
| Carthage.checkout | |
| Carthage.build | |
| ### Objective-C ### | |
| # Xcode |
| #CODE COMPLEXITY | |
| find "${SRCROOT}" \( -name "*.h" -or -name "*.m" -or -name "*.swift" \) -and \( -path "${SRCROOT}/Pods/*" -prune -o -print0 \) | xargs -0 wc -l | awk '$1 > 400 && $2 != "total" {for(i=2;i<NF;i++){printf "%s%s", $i, " "} print $NF ":1: warning: File more than 400 lines (" $1 "), consider refactoring." }' | |
| #TODO & FIXME CHECKER | |
| KEYWORDS="TODO|FIXME|\?\?\?:|\!\!\!:" | |
| find "${SRCROOT}" \( -name "*.h" -or -name "*.m" -or -name "*.swift" \) -and \( -path "${SRCROOT}/Pods/*" -prune -o -print0 \) | xargs -0 egrep --with-filename --line-number --only-matching "($KEYWORDS).*\$" | perl -p -e "s/($KEYWORDS)/ warning: \$1/" | |
| #TOTAL LINES - USELESS BUT FUN | |
| echo "Total lines of code:" | |
| find "${SRCROOT}" \( -name "*.h" -or -name "*.m" -or -name "*.swift" \) -and \( -path "${SRCROOT}/Pods/*" -prune -o -print0 \) | xargs -0 cat | wc -l |
| // | |
| // UIViewExtension.swift | |
| // SwiftTester | |
| // | |
| // Created by JulienGdt on 07/07/15. | |
| // Copyright (c) 2015 JulienGdt @jlngdt. All rights reserved. | |
| // @see https://gist.github.com/juliengdt/a80deda0ed2240b4d347 | |
| // | |
| import UIKit |