blob: e3e470a696bbeb3b5333891f00a4043cb66030ae [file] [log] [blame]
# Copyright (c) 2020-2021 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# To run locally:
# Prerequisits (only once):
#
# apt-get install aspell aspell-en
# pip install pyspelling
#
# Actual run:
#
# pyspelling pyspelling --config .spellcheck.yml
matrix:
- name: markdown
dictionary:
wordlists:
- .github/.wordlist.txt
pipeline:
# See https://facelessuser.github.io/pyspelling/configuration/#pipeline
# and https://facelessuser.github.io/pyspelling/filters/context/
# context-aware logic: we have a LOT of code examples in markdown,
# avoid trying to spellcheck code.
- pyspelling.filters.context:
context_visible_first: true
escapes: \\[\\`~]
delimiters:
# Ignore multiline content between fences (fences can have 3 or more back ticks)
# ```
# content
# ```
#
# Allows language marker (since github allows it) like:
# ```python
# content
# ```
#
# Allow MyST extended syntax like:
# ```{include} my/file.md
# ```
- open: '(?s)^(?P<open> *`{3,})([a-z]*$|{[a-z]*?}\s*[^\n]*?$)'
close: '^(?P=open)$'
# Ignore text between inline back ticks
- open: '(?P<open>`+)'
close: '(?P=open)'
# Ignore URL in hyperlinks [title](url)
- open: '\[[^]]*\]\('
close: '\)'
# Ignore code markers
- open: '<code>'
close: '</code>'
# converts markdown to HTML
- pyspelling.filters.markdown:
sources:
- '**/*.md|!third_party/**|!examples/common/**/repo/**|!docs/ERROR_CODES.md|!docs/clusters.md'
aspell:
ignore-case: true