Verified Commit 183fdb94 authored by Tej Chajed's avatar Tej Chajed
Browse files

Use GNU grep on macOS in coq-lint.sh

parent 9765b5fe
Pipeline #57755 passed with stage
in 7 minutes and 18 seconds
...@@ -4,7 +4,13 @@ set -e ...@@ -4,7 +4,13 @@ set -e
FILE="$1" FILE="$1"
if egrep -n '^\s*((Existing\s+|Program\s+|Declare\s+|)Instance|Arguments|Remove|Hint\s+(Extern|Constructors|Resolve|Immediate|Mode|Opaque|Transparent|Unfold)|(Open|Close)\s+Scope|Opaque|Transparent)\b' "$FILE"; then GREP="grep"
# on macOS, use GNU grep if available
if command -v ggrep &>/dev/null; then
GREP=ggrep
fi
if $GREP -E -n '^\s*((Existing\s+|Program\s+|Declare\s+|)Instance|Arguments|Remove|Hint\s+(Extern|Constructors|Resolve|Immediate|Mode|Opaque|Transparent|Unfold)|(Open|Close)\s+Scope|Opaque|Transparent)\b' "$FILE"; then
echo "ERROR: $FILE contains 'Instance'/'Arguments'/'Hint' or another side-effect without locality (see above)." echo "ERROR: $FILE contains 'Instance'/'Arguments'/'Hint' or another side-effect without locality (see above)."
echo "Please add 'Global' or 'Local' as appropriate." echo "Please add 'Global' or 'Local' as appropriate."
echo echo
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment