Skip to content

Commit a0930a0

Browse files
committed
Improve validation.
Remove old cases for different paths to trivial-validate.py. Pass --quiet option to trivial-validate so it doesn't spam error output with warnings about duplicate hostnames.
1 parent 465e486 commit a0930a0

2 files changed

Lines changed: 2 additions & 18 deletions

File tree

makexpi.sh

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -74,18 +74,7 @@ die() {
7474
}
7575

7676
if [ "$1" != "--fast" -a -z "$FAST" ] ; then
77-
if [ -f utils/trivial-validate.py ]; then
78-
VALIDATE="python2.7 ./utils/trivial-validate.py --ignoredups google --ignoredups facebook"
79-
elif [ -f trivial-validate.py ] ; then
80-
VALIDATE="python2.7 trivial-validate.py --ignoredups google --ignoredups facebook"
81-
elif [ -x utils/trivial-validate ] ; then
82-
# This case probably never happens
83-
VALIDATE=./utils/trivial-validate
84-
else
85-
VALIDATE=./trivial-validate
86-
fi
87-
88-
if $VALIDATE src/chrome/content/rules >&2
77+
if python2.7 ./utils/trivial-validate.py --quiet --db $RULESETS_SQLITE >&2
8978
then
9079
echo Validation of included rulesets completed. >&2
9180
echo >&2

utils/trivial-validate.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,16 @@
1111
parser = argparse.ArgumentParser(
1212
formatter_class=argparse.RawDescriptionHelpFormatter,
1313
description="Ruleset validation script.")
14-
parser.add_argument('--ignoredups', type=str, nargs="*",
15-
default="",
16-
help="Ignore entries."
17-
)
1814
parser.add_argument('--quiet', action="store_true",
1915
default=False, help="Suppress debug output."
2016
)
21-
parser.add_argument('--db', type=str, nargs="*",
17+
parser.add_argument('--db',
2218
default=os.path.join(os.path.dirname(__file__),
2319
"../src/defaults/rulesets.sqlite"),
2420
help='SQLite db with rules')
2521

2622
args = parser.parse_args()
2723

28-
ignoredups = [re.compile(val) for val in args.ignoredups]
2924
quiet = args.quiet
3025

3126
def warn(s):

0 commit comments

Comments
 (0)