mirror of
https://github.com/super-linter/super-linter.git
synced 2024-12-22 15:22:16 -05:00
20 lines
350 B
Bash
20 lines
350 B
Bash
|
#!/usr/bin/env bash
|
||
|
|
||
|
set -o errexit
|
||
|
set -o nounset
|
||
|
set -o pipefail
|
||
|
|
||
|
GIT_MERGE_CONFLICT_EXPRESSION='^(<<<<<<<|=======|>>>>>>>)'
|
||
|
|
||
|
if [[ "$*" == "--version" ]]; then
|
||
|
echo "1.0.0"
|
||
|
exit 0
|
||
|
fi
|
||
|
|
||
|
if grep -l -E "${GIT_MERGE_CONFLICT_EXPRESSION}" "$@"; then
|
||
|
echo "Found Git merge conflict markers"
|
||
|
exit 1
|
||
|
else
|
||
|
echo "No merge conflicts found in $*"
|
||
|
fi
|