Files
regorus/scripts/rego-lex
Ming-Wei Shih c0972ad2ba Update license to MIT
Signed-off-by: Ming-Wei Shih <mishih@microsoft.com>
2023-02-09 19:40:35 +00:00

28 lines
415 B
Bash
Executable File

#!/bin/bash
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
set -e
usage="usage: rego-lex <policy.rego> [-v]"
if [ -z "$1" ]; then
echo "$usage"
exit 1
fi
rego=$(realpath -e $1)
case "$2" in
"-v")
verbose="verbose"
;;
*)
if [ ! -z "$2" ]; then
echo "$usage"
exit 1
fi
esac
eval "cargo test lexer::one_file -- --include-ignored --nocapture $rego $verbose"