Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Degrees of Lewdity
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Vrelnir
Degrees of Lewdity
Commits
a576be5e
Commit
a576be5e
authored
5 years ago
by
Stuffed
Browse files
Options
Downloads
Patches
Plain Diff
sanityCheck - add check that variables in init.twee are in version-update.twee
parent
4fe1db86
No related branches found
Branches containing commit
No related tags found
1 merge request
!32
Add devCheck and fix sanityCheck and fix bugs it found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sanityCheck
+6
-0
6 additions, 0 deletions
sanityCheck
with
6 additions
and
0 deletions
sanityCheck
+
6
−
0
View file @
a576be5e
...
...
@@ -93,6 +93,12 @@ find . -name "*.twee" -exec cat '{}' ';' | tr -c '$a-zA-Z' '\n' | sed -n '/^[$]
find
.
-name
"*.twee"
-exec
cat
'{}'
';'
|
tr
-c
'.$a-zA-Z[]_'
'\n'
|
sed
's/SugarCube\.State\.variables\./$/g'
|
sed
-n
-e
's/^[$]\(PC\|activeSlave\|\(slaves\|tanks\)\[[^]]*\]*\)[.]\([a-zA-Z]\+\).*$/[.]\3/p'
|
sort
|
uniq
-u
|sed
's/^\(.*\)$/-e\1\\\\\b/'
| xargs
-r
git
grep
-n
--color
| myprint
"SlaveAttributeUsedOnce"
$GREP
"
\$\(
PC
\|
activeSlave
\|
slaves
\|
tanks
\)
[.][^a-zA-Z]"
| myprint
"UnexpectedCharAfterDot"
#Find all the variables listed in init.twee
VARIABLELIST
=
$(
cat
base-system/init.twee |
tr
-c
'$a-zA-Z'
'\n'
|
sed
-n
'/^[$]/p'
|
sort
|
uniq
)
# Find all variables anywhere. Commented out because the output is too noisy currently
#VARIABLELIST=$(find . -name "*.twee" -exec cat '{}' ';' | tr -c '$a-zA-Z' '\n' | sed -n '/^[$]/p' | sort | uniq)
MISSINGFROMVERSIONUPDATE
=
$(
for
variable
in
$VARIABLELIST
;
do
grep
-q
"
$variable
"
base-system/version-update.twee
||
echo
"
$variable
"
;
done
)
echo
-e
"base-system/version-update.twee
$ENDC
:
$(
echo
$MISSINGFROMVERSIONUPDATE
)
"
| myprint
"MissingFromVersionUpdate"
)
git ls-files
"game/*.twee"
| xargs
-d
'\n'
./devTools/check.py
...
...
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