File tree Expand file tree Collapse file tree 2 files changed +53
-6
lines changed Expand file tree Collapse file tree 2 files changed +53
-6
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env sh
2
2
3
- npx tsc --noEmit --skipLibCheck
3
+ while [ $# -gt 0 ]; do
4
+ case " $1 " in
5
+ " tc" )
6
+ check_types=" $check_types tc"
7
+ ;;
8
+ " lint" )
9
+ check_types=" $check_types lint"
10
+ ;;
11
+ " licensing" )
12
+ check_types=" $check_types licensing"
13
+ ;;
14
+ * )
15
+ if [ " $1 " != " --help" ] && [ " $1 " != " -help" ] && [ " $1 " != " -h" ]; then
16
+ echo " Invalid flag $1 "
17
+ echo
18
+ fi
19
+ echo " Usage:"
20
+ echo
21
+ echo " $0 [tc] [lint] [licensing]"
22
+ echo
23
+ echo " * tc: runs the type-checker"
24
+ echo " * lint: checks for linting errors"
25
+ echo " * licensing: checks for missing licensing headers"
26
+ echo
27
+ echo " Defaults to running all checks if no specific checks are specified."
28
+ exit
29
+ esac
30
+ shift
31
+ done
4
32
5
- npm run lint -- --no-warn-ignored
33
+ if [ -z " $check_types " ]; then
34
+ check_types=" tc lint licensing"
35
+ fi
36
+
37
+ for check_type in $check_types ; do
38
+ case $check_type in
39
+ " tc" )
40
+ echo " Running type-checker..."
41
+ npx tsc --noEmit --skipLibCheck || exit 10
42
+ ;;
43
+ " lint" )
44
+ echo " Running linter..."
45
+ npm run lint -- --no-warn-ignored || exit 20
46
+ ;;
47
+ " licensing" )
48
+ echo " Checking for missing licensing headers..."
49
+ find tests/ src/ -type f -exec grep -L " ^// Copyright DataStax, Inc." {} + || exit 30
50
+ ;;
51
+ " *" )
52
+ echo " Invalid check type '$check_type '"
53
+ exit 1
54
+ ;;
55
+ esac
56
+ done
You can’t perform that action at this time.
0 commit comments