Skip to content
Snippets Groups Projects
Verified Commit 183fdb94 authored by Tej Chajed's avatar Tej Chajed
Browse files

Use GNU grep on macOS in coq-lint.sh

parent 9765b5fe
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,13 @@ set -e
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 "Please add 'Global' or 'Local' as appropriate."
echo
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment