blob: 28915deea38167250ca016f09bc9a1aa1ad3e866 [file] [log] [blame]
Victor Morales9e8d2682021-09-14 09:34:55 -07001# Copyright (c) 2020-2021 Project CHIP Authors
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
Andrei Litvina76f75e2022-04-13 08:34:42 -100015# 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
Victor Morales9e8d2682021-09-14 09:34:55 -070025matrix:
26 - name: markdown
27 dictionary:
28 wordlists:
29 - .github/.wordlist.txt
30 pipeline:
Andrei Litvina76f75e2022-04-13 08:34:42 -100031 # 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 # ```
Gaute Svanes Lundee7347ea2023-01-09 19:43:07 +010049 #
50 # Allow MyST extended syntax like:
51 # ```{include} my/file.md
52 # ```
53 - open: '(?s)^(?P<open> *`{3,})([a-z]*$|{[a-z]*?}\s*[^\n]*?$)'
Andrei Litvina76f75e2022-04-13 08:34:42 -100054 close: '^(?P=open)$'
55 # Ignore text between inline back ticks
56 - open: '(?P<open>`+)'
57 close: '(?P=open)'
58 # Ignore URL in hyperlinks [title](url)
59 - open: '\[[^]]*\]\('
60 close: '\)'
61 # Ignore code markers
62 - open: '<code>'
63 close: '</code>'
64
65 # converts markdown to HTML
Victor Morales9e8d2682021-09-14 09:34:55 -070066 - pyspelling.filters.markdown:
67 sources:
Tennessee Carmel-Veilleux0f2388e2022-10-13 16:24:48 -040068 - '**/*.md|!third_party/**|!examples/common/**/repo/**|!docs/ERROR_CODES.md'
Victor Morales9e8d2682021-09-14 09:34:55 -070069 aspell:
70 ignore-case: true