Make sure we didn't commit conflicts

This commit is contained in:
Lin Jen-Shin (godfat) 2017-08-01 12:06:56 +00:00 committed by Rémy Coutable
parent 0bbf006454
commit 913aca1db9
2 changed files with 7 additions and 1 deletions

5
scripts/lint-conflicts.sh Executable file
View file

@ -0,0 +1,5 @@
#!/bin/sh
output=`git ls-files -z | grep -zvE '\.(rb|js|haml)$' | xargs -0n1 grep -HEn '^<<<<<<< '`
echo $output
test -z "$output"

View file

@ -11,7 +11,8 @@ tasks = [
%w[bundle exec rake brakeman],
%w[bundle exec license_finder],
%w[yarn run eslint],
%w[bundle exec rubocop --require rubocop-rspec]
%w[bundle exec rubocop --require rubocop-rspec],
%w[scripts/lint-conflicts.sh]
]
failed_tasks = tasks.reduce({}) do |failures, task|