mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-03-25 09:05:47 +00:00
editing
This commit is contained in:
parent
4dc0bde5fc
commit
d849f5d78c
1 changed files with 4 additions and 2 deletions
|
|
@ -41,7 +41,9 @@ First ignore the fact I'm talking to a shell script. I don't get out much. Anywa
|
|||
if diff-index $test_glob | grep '^+' | egrep "$test_pattern" >/dev/null 2>&1
|
||||
...
|
||||
|
||||
and
|
||||
_Pro tip: I wrapped test_pattern with `\b` to only match word boundaries to reduce false positives._
|
||||
|
||||
And:
|
||||
|
||||
misplaced_pattern='misplaced="YES"'
|
||||
misplaced_glob=('*.xib' '*.storyboard')
|
||||
|
|
@ -57,7 +59,7 @@ Then we need to show where the errors are by using `git grep`, with an `|| true`
|
|||
git grep -E "$test_pattern" $test_glob || true >&2
|
||||
echo '----' >&2
|
||||
|
||||
end for misplaced views:
|
||||
And for misplaced views:
|
||||
|
||||
echo "COMMIT REJECTED for misplaced views. Correct them before committing." >&2
|
||||
git grep -E "$misplaced_pattern" $misplaced_glob || true >&2
|
||||
|
|
|
|||
Loading…
Reference in a new issue