Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Plumed AlphaFold
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Kurečka
Plumed AlphaFold
Commits
a3aa0cba
There was an error fetching the commit references. Please try again later.
Commit
a3aa0cba
authored
5 years ago
by
Gareth Tribello
Browse files
Options
Downloads
Patches
Plain Diff
Fixed script for spelling errors
parent
6ac1524d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
user-doc/go-spelling
+21
-4
21 additions, 4 deletions
user-doc/go-spelling
with
21 additions
and
4 deletions
user-doc/go-spelling
+
21
−
4
View file @
a3aa0cba
#!/bin/bash
RED
=
'\033[0;31m'
NC
=
'\033[0m'
# No Color
rm
-rf
spelling
mkdir
spelling
# Get names of all actions and command line tools
...
...
@@ -19,7 +22,7 @@ cat spelling/keywords spelling/allkeys spelling_words.dict >> spelling/allwords.
# This is everything we have done thus far
for
file
in
*
PP.md automatic/
*
.txt ../CHANGES/
*
.md tutorials/
*
.txt tutorials/
*
.site tutorials/others/
*
.txt
;
do
echo
Checking spelling
for
file
$file
#
echo Checking spelling for file $file
splits
=
`
echo
$file
|
sed
-e
's/\// /g'
`
nf
=
`
echo
$splits
|
awk
'{print NF}'
`
fname
=
`
echo
$splits
|
awk
-v
n
=
$nf
'{print $n}'
`
...
...
@@ -44,8 +47,22 @@ for file in *PP.md automatic/*.txt ../CHANGES/*.md tutorials/*.txt tutorials/*.s
nerrors
=
`
wc
-l
spelling/
$fname
.err |
awk
'{print $1}'
`
# Crash out if there are spelling mistakes
if
[
$nerrors
-gt
0
]
;
then
echo
"Found spelling mistakes in documentation file
$file
"
cat
spelling/
$fname
.err
exit
1
echo
-e
"
$RED
>>Found spelling mistakes in documentation file
$file
:
$NC
"
>>
spelling_results
cat
spelling/
$fname
.err
>>
spelling_results
fi
done
if
test
-z
$TRAVIS
;
then
cat
spelling_results
else
ASPELL_RESULTS
=
`
cat
spelling_results
`
curl
-i
-H
"Authorization: token
$GITHUB_TOKEN
"
\
-H
"Content-Type: application/json"
\
-X
POST
-d
"{
\"
body
\"
:
\"
$ASPELL_RESULTS
\"
}"
\
https://api.github.com/repos/plumed/plumed2/comments/1
fi
rm
-f
spelling_results
exit
0
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment