Skip to content

Commit a76f75e

Browse files
authoredApr 13, 2022
Attempt to skip code in misspell (#17335)
* Attempt to skip code in misspell * Changed a readme.md containing odd words to see if filtering works * Escape a md file and try to ignore hyperlink content in spellcheck * More escaping for code in mbedos_commissioning.md * Add instructions for local spelling run * More updates to make spell checker happy * Cleanup some image logic in mbed unit test files * More updates for spelling - move code blocks into code blocks * More paths updates for lwip patch readme * Restyle * update for allow language in 3 backticks, replaced a lot of mbedos logo pictures * Code and image block updates on guides * Updating several nrf files for code blocks * update k32w android doc for code blocks * Code blocks for several readmes * Code blocks for some silabs and esp32 * Code blocks * More code blocks * More code blocks * More code blocks * More code blocks * More code blocks * Roll back some of the wordlist - this takes too long. Just fix some super obvious ones and have some code improvements * Restyle * Fix misplaced backtick
1 parent 213869f commit a76f75e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+833
-285
lines changed
 

‎.github/.wordlist.txt

-14
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
21
99
22
1010
AAAA
11-
aabbccddeeff
1211
aarch
1312
abcdef
1413
abfb
@@ -510,7 +509,6 @@ ffeebaefa
510509
FFF
511510
fffe
512511
fffff
513-
fHtcwcAAAAAAAAAwQAAAAAAXPMlAAAAAAA
514512
Fi
515513
filepath
516514
fini
@@ -1392,17 +1390,13 @@ xAAAA
13921390
xab
13931391
xaver
13941392
xb
1395-
xBEEF
13961393
xbef
13971394
xc
13981395
xcd
13991396
Xcode
14001397
xcodeproj
14011398
xcworkspace
14021399
xd
1403-
xDEAD
1404-
xDEADBEEF
1405-
xdeadbeefcafe
14061400
xds
14071401
xdsdfu
14081402
xEA
@@ -1420,15 +1414,8 @@ xFF
14201414
xFFF
14211415
xFFFF
14221416
xfffff
1423-
xFFFFFFFD
1424-
xffffffffe
1425-
xfffffffff
1426-
xffffffffffff
1427-
xffffffffffffXXXX
14281417
xtensa
14291418
xwayland
1430-
XXXX
1431-
XXXXXXXX
14321419
xyz
14331420
xz
14341421
xzvf
@@ -1439,7 +1426,6 @@ YNJV
14391426
Yocto
14401427
yoctoproject
14411428
YourFolder
1442-
yWsC
14431429
zapt
14441430
zaptool
14451431
ZCL

‎.spellcheck.yml

+41
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,53 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# To run locally:
16+
# Prerequisits (only once):
17+
#
18+
# apt-get install aspell aspell-en
19+
# pip install pyspelling
20+
#
21+
# Actual run:
22+
#
23+
# pyspelling pyspelling --config .spellcheck.yml
24+
1525
matrix:
1626
- name: markdown
1727
dictionary:
1828
wordlists:
1929
- .github/.wordlist.txt
2030
pipeline:
31+
# See https://facelessuser.github.io/pyspelling/configuration/#pipeline
32+
# and https://facelessuser.github.io/pyspelling/filters/context/
33+
34+
# context-aware logic: we have a LOT of code examples in markdown,
35+
# avoid trying to spellcheck code.
36+
- pyspelling.filters.context:
37+
context_visible_first: true
38+
escapes: \\[\\`~]
39+
delimiters:
40+
# Ignore multiline content between fences (fences can have 3 or more back ticks)
41+
# ```
42+
# content
43+
# ```
44+
#
45+
# Allows language marker (since github allows it) like:
46+
# ```python
47+
# content
48+
# ```
49+
- open: '(?s)^(?P<open> *`{3,})[a-z]*$'
50+
close: '^(?P=open)$'
51+
# Ignore text between inline back ticks
52+
- open: '(?P<open>`+)'
53+
close: '(?P=open)'
54+
# Ignore URL in hyperlinks [title](url)
55+
- open: '\[[^]]*\]\('
56+
close: '\)'
57+
# Ignore code markers
58+
- open: '<code>'
59+
close: '</code>'
60+
61+
# converts markdown to HTML
2162
- pyspelling.filters.markdown:
2263
sources:
2364
- '**/*.md|!third_party/**|!examples/common/**/repo/**'

0 commit comments

Comments
 (0)
Please sign in to comment.