File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change
1
+ # $1 is the content directory in which to check spelling. A content directory is
2
+ # a git submodule pointing to a branch of the gravitational/teleport repository.
3
+
4
+ if [ $# -eq 0 ]; then
5
+
6
+ cat<< EOF
7
+
8
+ You must provide an argument to the spellcheck script. The argument must be the
9
+ path to a content directory, which is either:
10
+
11
+ - A subdirectory of "content" within a gravitational/docs clone
12
+ - The root of a gravitational/teleport clone
13
+
14
+ EOF
15
+ exit 1;
16
+ fi
17
+
18
+ if [ ! -e $1 /docs/cspell.json ]; then
19
+
20
+ cat<< EOF
21
+
22
+ We could not find $1 /docs/cspell.json. Make sure you run the spellcheck script
23
+ on either:
24
+
25
+ - A subdirectory of "content" within a gravitational/docs clone
26
+ - The root of a gravitational/teleport clone
27
+
28
+ EOF
29
+ exit 1;
30
+ fi
31
+
32
+ npx cspell lint --no-progress --config $1 /docs/cspell.json " $1 /docs/pages/**/*.mdx" " $1 /CHANGELOG.md" ;
33
+ RES=$? ;
34
+ if [ $RES -ne 0 ]; then
35
+ cat<< EOF
36
+
37
+ There are spelling issues in one or more pages within $1 /docs/pages (see the
38
+ logs above). Either fix the misspellings or, if these are not actually issues,
39
+ edit the list of ignored words in $1 /docs/cspell.json.
40
+
41
+ EOF
42
+ exit $RES ;
43
+ fi
44
+
You can’t perform that action at this time.
0 commit comments