Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3424701
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
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
Issue forks
drupal-3424701
Commits
7ab83718
Commit
7ab83718
authored
1 year ago
by
catch
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3386607
by alexpott: Improve spell checking in commit-code-check.sh
parent
bb973f7f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/package.json
+1
-1
1 addition, 1 deletion
core/package.json
core/scripts/dev/commit-code-check.sh
+6
-4
6 additions, 4 deletions
core/scripts/dev/commit-code-check.sh
with
7 additions
and
5 deletions
core/package.json
+
1
−
1
View file @
7ab83718
...
...
@@ -22,7 +22,7 @@
"prettier"
:
"prettier --write
\"
./**/*.js
\"
"
,
"spellcheck"
:
"cspell -c .cspell.json"
,
"spellcheck:make-drupal-dict"
:
"rm -f misc/cspell/dictionary.txt && touch misc/cspell/dictionary.txt && yarn -s spellcheck:core --unique --words-only | perl -Mopen=locale -pe '$_=lc$_' | LC_ALL=en_US.UTF-8 tr -d
\\\\\\\\
| LC_ALL=C sort -u -o misc/cspell/dictionary.txt"
,
"spellcheck:core"
:
"cspell -c .cspell.json
--no-progress
--root ..
\"
core/**/*
\"
\"
composer/**/*
\"
\"
composer.json
\"
"
,
"spellcheck:core"
:
"cspell -c .cspell.json --root ..
\"
core/**/*
\"
\"
composer/**/*
\"
\"
composer.json
\"
"
,
"vendor-update"
:
"node ./scripts/js/vendor-update.js"
,
"watch:ckeditor5"
:
"webpack --config ./modules/ckeditor5/webpack.config.js --watch"
,
"build:ckeditor5"
:
"webpack --config ./modules/ckeditor5/webpack.config.js"
,
...
...
This diff is collapsed.
Click to expand it.
core/scripts/dev/commit-code-check.sh
+
6
−
4
View file @
7ab83718
...
...
@@ -176,7 +176,7 @@
CKEDITOR5_PLUGINS_CHANGED
=
1
;
fi
;
if
[[
$FILE
==
"core/misc/cspell/dictionary.txt"
]]
;
then
if
[[
$FILE
==
"core/misc/cspell/dictionary.txt"
||
$FILE
==
"core/.cspell.json"
]]
;
then
CSPELL_DICTIONARY_FILE_CHANGED
=
1
;
fi
done
...
...
@@ -215,13 +215,15 @@
exit
1
;
fi
# Run spellcheck:core when cspell files are changed.
# Check all files for spelling in one go for better performance.
if
[[
$CSPELL_DICTIONARY_FILE_CHANGED
==
"1"
]]
;
then
printf
"
\n
Running spellcheck on *all* files.
\n
"
yarn run
-s
spellcheck:core
--no-must-find-files
--
root
$TOP_LEVEL
$ABS_FILES
yarn run
-s
spellcheck:core
--no-must-find-files
--
no-progress
else
yarn run
-s
spellcheck
--no-must-find-files
--root
$TOP_LEVEL
$ABS_FILES
# Check all files for spelling in one go for better performance. We pipe the
# list files in so we obey the globs set on the spellcheck:core command in
# core/package.json.
echo
"
${
ABS_FILES
}
"
|
tr
' '
'\n'
| yarn run
-s
spellcheck:core
--no-must-find-files
--file-list
stdin
fi
if
[
"
$?
"
-ne
"0"
]
;
then
...
...
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