Skip to content

Commit

Permalink
Attempt to skip code in misspell (#17335)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
andy31415 authored and pull[bot] committed Nov 23, 2023
1 parent c42e72d commit 1155284
Show file tree
Hide file tree
Showing 49 changed files with 833 additions and 285 deletions.
14 changes: 0 additions & 14 deletions .github/.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
21
22
AAAA
aabbccddeeff
aarch
abcdef
abfb
Expand Down Expand Up @@ -510,7 +509,6 @@ ffeebaefa
FFF
fffe
fffff
fHtcwcAAAAAAAAAwQAAAAAAXPMlAAAAAAA
Fi
filepath
fini
Expand Down Expand Up @@ -1392,17 +1390,13 @@ xAAAA
xab
xaver
xb
xBEEF
xbef
xc
xcd
Xcode
xcodeproj
xcworkspace
xd
xDEAD
xDEADBEEF
xdeadbeefcafe
xds
xdsdfu
xEA
Expand All @@ -1420,15 +1414,8 @@ xFF
xFFF
xFFFF
xfffff
xFFFFFFFD
xffffffffe
xfffffffff
xffffffffffff
xffffffffffffXXXX
xtensa
xwayland
XXXX
XXXXXXXX
xyz
xz
xzvf
Expand All @@ -1439,7 +1426,6 @@ YNJV
Yocto
yoctoproject
YourFolder
yWsC
zapt
zaptool
ZCL
Expand Down
41 changes: 41 additions & 0 deletions .spellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,53 @@
# 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
# ```
- open: '(?s)^(?P<open> *`{3,})[a-z]*$'
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/**'
Expand Down
4 changes: 2 additions & 2 deletions docs/api/device_runner.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,5 @@ enable reusing tests between different devices.
The TSG is targeting the following platforms/boards for early bringup:

- Nordic nRF52 board <TODO: REF>
- SiLabs XXXX board <TODO:REF>
- Espressif ESP32 XXXX board <TODO:REF>
- SiLabs `XXXX` board <TODO:REF>
- Espressif ESP32 `XXXX` board <TODO:REF>
6 changes: 3 additions & 3 deletions docs/discussion/lwip_ipv6.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ addresses for communication to nodes on the same network (wifi or thread). When
there is more than one netif in the system (ex. loopback, softAP, STA), the link
local address needs more information to determine which link the address is
local to. This is normally added as the link local scope and can be seen on
addresses ex. FE80::xxxx:xxxx:xxxx:xxxx%<scope>, where the <scope> identifies
the netif (something like %wlan0 or %eno1 etc.).
addresses ex. `FE80::xxxx:xxxx:xxxx:xxxx%<scope>`, where the <scope> identifies
the netif (something like `%wlan0` or `%eno1` etc.).

Without this indicator, the link local address can only be resolved if there is
one netif. LwIP will also allow a direct address match to the netif source
Expand Down Expand Up @@ -122,7 +122,7 @@ Instead, it might be better to build this into the ICMP layer itself.
LwIP's DNS handling isn’t great and breaks down when the router supports
IPv4/IPv6. There is a single list of DNS servers, DHCP, SLAAC and DHCPv6 all
update the list without locks. Basically, whatever wrote to the list last gets
to set the list. Although there is handling for IP type (requesting A or AAAA
to set the list. Although there is handling for IP type (requesting A or `AAAA`
records), there isn’t handling to specify an IPv6 or IPv4 server specifically,
which can be challenging since not all servers serve all record types.

Expand Down
44 changes: 22 additions & 22 deletions docs/examples/discussion/PID_allocation_for_example_apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,34 @@
Unless specifically overridden by the platform, example apps in this SDK use the
Example credentials implementation in `DeviceAttestationCredsExample.cpp`.

The SDK holds example certificates for VID '0xFFF1' and any PID in
'0x8000-0x801F'. The device VID and PID supplied by the basic information
The SDK holds example certificates for VID `0xFFF1` and any PID in
`0x8000-0x801F`. The device VID and PID supplied by the basic information
cluster must correspond to the VID/PID given in the certificate for the device
to pass verification.

Certificates are selected using the value in
CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID. The vendor ID for every example app is the
same because they are all signed by the same PAI (vendor id '0xFFF1').
same because they are all signed by the same PAI (vendor id `0xFFF1`).

In order to allow some differentiation between the various example apps, each
app is assigned a PID from the list below:

| App | PID |
| ----------------------- | ------ |
| All Clusters | 0x8001 |
| Bridge | 0x8002 |
| Door Lock | 0x8003 |
| Light switch | 0x8004 |
| Lighting | 0x8005 |
| Lock | 0x8006 |
| OTA provider | 0x8007 |
| OTA requestor | 0x8008 |
| Persistent Storage | 0x8009 |
| Pigweed | 0x800B |
| Pump | 0x800A |
| Pump Controller | 0x8011 |
| Shell | 0x8012 |
| Temperature measurement | 0x800D |
| Thermostat | 0x800E |
| TV | 0x800F |
| Window | 0x8010 |
| App | PID |
| ----------------------- | -------- |
| All Clusters | `0x8001` |
| Bridge | `0x8002` |
| Door Lock | `0x8003` |
| Light switch | `0x8004` |
| Lighting | `0x8005` |
| Lock | `0x8006` |
| OTA provider | `0x8007` |
| OTA requestor | `0x8008` |
| Persistent Storage | `0x8009` |
| Pigweed | `0x800B` |
| Pump | `0x800A` |
| Pump Controller | `0x8011` |
| Shell | `0x8012` |
| Temperature measurement | `0x800D` |
| Thermostat | `0x800E` |
| TV | `0x800F` |
| Window | `0x8010` |
2 changes: 1 addition & 1 deletion docs/guides/BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ To run all tests, run:
ninja -C out/host check
```

To run only the tests in src/inet/tests, you can run:
To run only the tests in `src/inet/tests`, you can run:

```
ninja -C out/host src/inet/tests:tests_run
Expand Down
4 changes: 1 addition & 3 deletions docs/guides/matter-repl.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,7 @@ cloud-hosted playground.
The following icon is present at the top of applicable guides that can be
launched into the playground:
<a href="https://www.w3schools.com">
<img src="https://i.ibb.co/hR3yWsC/launch-playground.png" alt="drawing" width="130"/>
</a>
![Launch playground icon](https://i.ibb.co/hR3yWsC/launch-playground.png")
<br></br>
## Guides
Expand Down
4 changes: 1 addition & 3 deletions docs/guides/mbedos_add_new_target.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<p align="center">
<img src="https://raw.githubusercontent.com/ARMmbed/mbed-os/master/logo.png" alt="ARM Mbed-OS logo"/>
</p>
![ARM Mbed-OS logo](https://raw.githubusercontent.com/ARMmbed/mbed-os/master/logo.png)

<h1> Mbed-OS add new hardware target </h1>

Expand Down
10 changes: 7 additions & 3 deletions docs/guides/mbedos_commissioning.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<p align="center">
<img src="https://raw.githubusercontent.com/ARMmbed/mbed-os/master/logo.png" alt="ARM Mbed-OS logo"/>
</p>
![ARM Mbed-OS logo](https://raw.githubusercontent.com/ARMmbed/mbed-os/master/logo.png)

<h1> Matter Arm Mbed OS provisioning guide </h1>

Expand Down Expand Up @@ -67,7 +65,9 @@ After building, install the application by completing the following steps:
1. Install the Android Debug Bridge (adb) package by running the following
command:

```
$ sudo apt install android-tools-adb
```

2. Enable **USB debugging** on your smartphone. See the
[Configure on-device developer options](https://developer.android.com/studio/debug/dev-options)
Expand All @@ -94,7 +94,9 @@ complete the following steps:
accessory device. You can use **mbed-tools** for this purpose
([mbed-tools](https://github.com/ARMmbed/mbed-tools)):

```
mbed-tools sterm -p /dev/ttyACM0 -b 115200 -e off
```

To start the rendezvous, CHIPTool must get the commissioning information from
the Matter device. The data payload is encoded within a QR code and is printed
Expand All @@ -104,8 +106,10 @@ to the UART console.

- Find a message similar to the following one in the application logs:

```
[INFO][CHIP]: [SVR]Copy/paste the below URL in a browser to see the QR Code:
[INFO][CHIP]: [SVR]https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3AYNJV7VSC00CMVH7SR00
```

- Open URL from the console to display the QR in a web browser.

Expand Down
8 changes: 2 additions & 6 deletions docs/guides/mbedos_platform_overview.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<p align="center">
<img src="https://raw.githubusercontent.com/ARMmbed/mbed-os/master/logo.png" alt="ARM Mbed-OS logo"/>
</p>
![ARM Mbed-OS logo](https://raw.githubusercontent.com/ARMmbed/mbed-os/master/logo.png)

# Mbed-OS platform overview

Expand All @@ -11,9 +9,7 @@ Mbed-OS 6.
The following diagram shows a simplified structure of a Matter application which
runs on the top of the Mbed-OS.

<p align="center">
<img src="images/matter_mbedos_overview_simplified.png" alt="matter_mbedos_overview_simplified">
</p>
![matter_mbedos_overview_simplified](images/matter_mbedos_overview_simplified.png)

# ARM Mbed-OS

Expand Down
8 changes: 6 additions & 2 deletions docs/guides/nrfconnect_android_commissioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ After building, install the application by completing the following steps:
1. Install the Android Debug Bridge (adb) package by running the following
command:

$ sudo apt install android-tools-adb
```
sudo apt install android-tools-adb
```

2. Enable **USB debugging** on the smartphone. See the
[Configure on-device developer options](https://developer.android.com/studio/debug/dev-options)
Expand All @@ -122,7 +124,9 @@ After building, install the application by completing the following steps:
5. Run the following command to install the application, with _chip-dir_
replaced with the path to the Matter source directory:

$ adb install -r chip-dir/src/android/CHIPTool/app/build/outputs/apk/debug/app-debug.apk
```
adb install -r chip-dir/src/android/CHIPTool/app/build/outputs/apk/debug/app-debug.apk
```

6. Navigate to settings on your smartphone and grant **Camera** and
**Location** permissions to CHIPTool.
Expand Down
6 changes: 4 additions & 2 deletions docs/guides/nrfconnect_examples_cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ To access the CLI console, use a serial terminal emulator of your choice, like
Minicom or GNU Screen. Use the baud rate set to `115200`.

For example, to start using the CLI console with Minicom, run the following
command with _/dev/ttyACM0_ replaced with the device node name of your
command with `/dev/ttyACM0` replaced with the device node name of your
development kit:

$ minicom -D /dev/ttyACM0 -b 115200
```
minicom -D /dev/ttyACM0 -b 115200
```

When you reboot the kit, you will see the boot logs in the console, similar to
the following messages:
Expand Down
12 changes: 9 additions & 3 deletions docs/guides/nrfconnect_examples_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,16 @@ Complete the following steps:
directory, with _build-target_ replaced with the build target name of the
kit, for example _nrf52840dk_nrf52840_:

$ west build -b build-target
```
west build -b build-target
```

2. Run the terminal-based interface called menuconfig by typing the following
command:

$ west build -t menuconfig
```
west build -t menuconfig
```

The menuconfig terminal window appears, in which you can navigate using
arrow keys and other keys, based on the description at the bottom of the
Expand Down Expand Up @@ -93,7 +97,9 @@ that you rebuild your application after editing them by typing the following
command in the example directory, with _build-target_ replaced with the build
target name of the kit, for example _nrf52840dk_nrf52840_:

$ west build -b build-target
```
west build -b build-target
```

<hr>

Expand Down
Loading

0 comments on commit 1155284

Please sign in to comment.