From 913aca1db9b1bbf90f3490262c4429d95fbc517c Mon Sep 17 00:00:00 2001 From: "Lin Jen-Shin (godfat)" Date: Tue, 1 Aug 2017 12:06:56 +0000 Subject: [PATCH] Make sure we didn't commit conflicts --- scripts/lint-conflicts.sh | 5 +++++ scripts/static-analysis | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100755 scripts/lint-conflicts.sh diff --git a/scripts/lint-conflicts.sh b/scripts/lint-conflicts.sh new file mode 100755 index 00000000000..f3877600c8c --- /dev/null +++ b/scripts/lint-conflicts.sh @@ -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" diff --git a/scripts/static-analysis b/scripts/static-analysis index 6d35684b97f..e4f80e8fc6f 100755 --- a/scripts/static-analysis +++ b/scripts/static-analysis @@ -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|