Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Add codespell integration #2642

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .codespellignorewords
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Kurtis Lew is a contributor
Lew

# shield name
blok

# Kconfig keyword
rsource

# clock source
hsi

# shorter alias for SHIFT in comments
SHFT
3 changes: 3 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[codespell]
skip = docs/package-lock.json,*.svg
ignore-words = .codespellignorewords
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,7 @@ repos:
- id: check-added-large-files
- id: check-shebang-scripts-are-executable
exclude: "\\.mustache$"
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
identity and expression, level of experience, education, socioeconomic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

Expand Down
2 changes: 1 addition & 1 deletion app/Kconfig.behaviors
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ config ZMK_BEHAVIOR_LOCAL_ID_TYPE_SETTINGS_TABLE
help
Use persistent entries in the settings subsystem to identify
behaviors by local ID, which uses the device name to generate
a new settings entry tying a presistant local ID to that name.
a new settings entry tying a persistent local ID to that name.
This guarantees stable, colllision-free local IDs at the expense
of settings storage used.

Expand Down
2 changes: 1 addition & 1 deletion app/boards/arm/planck/planck_rev6.dts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@


/ {
model = "Plack PCD, rev6";
model = "Planck PCB, rev6";
compatible = "planck,rev6", "st,stm32f303";

chosen {
Expand Down
2 changes: 1 addition & 1 deletion app/boards/shields/clueboard_california/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ config ZMK_KEYBOARD_NAME

# Unable to use interrupts as the same pin number is used
# across A & B controllers, and STM32F303CCT6 can't enable
# interrutps for multiple controllers for the same "line"
# interrupts for multiple controllers for the same "line"
# for the external interrupts.
config ZMK_KSCAN_DIRECT_POLLING
default y
Expand Down
2 changes: 1 addition & 1 deletion app/boards/shields/leeloo/leeloo_rev2.conf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y

# When USB is disconnected, turn off LEDs
# Change to n if you wish to keep LEDs on even when USB is unpluged.
# Change to n if you wish to keep LEDs on even when USB is unplugged.
# CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_USB=y

# Start LEDs off at 75%
Expand Down
2 changes: 1 addition & 1 deletion app/boards/shields/leeloo_micro/leeloo_micro.conf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y

# When USB is disconnected, turn off LEDs
# Change to n if you wish to keep LEDs on even when USB is unpluged.
# Change to n if you wish to keep LEDs on even when USB is unplugged.
# CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_USB=y

# Start LEDs off at 75%
Expand Down
2 changes: 1 addition & 1 deletion app/include/drivers/behavior.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ struct zmk_behavior_local_id_map {
* @param binding The behavior binding to validate.
*
* @retval 0 if the passed in binding is valid.
* @retval -ENODEV if the binding references a non-existant behavior.
* @retval -ENODEV if the binding references a non-existent behavior.
* @retval -EINVAL if parameters are not valid for the behavior metadata.
*/
int zmk_behavior_validate_binding(const struct zmk_behavior_binding *binding);
Expand Down
2 changes: 1 addition & 1 deletion app/module/drivers/display/il0323.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ static int il0323_controller_init(const struct device *dev) {
k_msleep(IL0323_PON_DELAY);
il0323_busy_wait(cfg);

/* Pannel settings, KW mode */
/* Panel settings, KW mode */
tmp[0] = IL0323_PSR_UD | IL0323_PSR_SHL | IL0323_PSR_SHD | IL0323_PSR_RST;
#if EPD_PANEL_WIDTH == 80

Expand Down
2 changes: 1 addition & 1 deletion app/src/behaviors/behavior_macro.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ static int behavior_macro_init(const struct device *dev) {
LOG_DBG("Release will resume at %d", state->release_state.start_index);
break;
} else {
// Ignore regular invokable bindings
// Ignore regular invocable bindings
}
}

Expand Down
2 changes: 1 addition & 1 deletion docs/blog/2023-04-06-zephyr-3-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ The following RP2040 powered controllers have board definitions for folks to tes

- Raspberry Pi Pico (`rpi_pico`)
- SparkFun Pro Micro RP2040 (`sparkfun_pro_micro_rp2040`)
- Adafruit Keyboar/KB2040 (`adafruit_kb2040`)
- Adafruit Keyboar/KB2040 (`adafruit_kb2040`) <!-- codespell:ignore keyboar -->
elpekenin marked this conversation as resolved.
Show resolved Hide resolved
- Seeeduino XIAO RP2040 (`seeeduino_xiao_rp2040`)
- Adafruit Qt PY RP2040 (`adafruit_qt_py_rp2040`)
- BoardSource blok (`boardsource_blok`)
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/config/battery.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Driver for reading the voltage of a battery using an ADC connected to a voltage

Applies to: `compatible = "zmk,battery-voltage-divider"`

See [Zephyr's voltage divider documentation](https://docs.zephyrproject.org/3.5.0/build/dts/api/bindings/iio/afe/voltage-divider.html).
See [Zephyr's voltage divider documentation](https://docs.zephyrproject.org/3.5.0/build/dts/api/bindings/iio/afe/voltage-divider.html). <!-- codespell:ignore afe -->
elpekenin marked this conversation as resolved.
Show resolved Hide resolved

## nRF VDDH Battery Sensor

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ url: https://github.com/foostan/crkbd/

### Interconnect Requires/Exposes

For boards and shields, one of the key pieces of high level information is compatibility between the two items. In particular, a board usually exposes one ore more "interconnects", the physical location/type of connections available, and their assigned possible uses (e.g. GPIO, power, ground, i2c, etc). Similarly, a shield is usually designed around one (or sometimes more) "interconnects" that allow it to connect to one of those boards.
For boards and shields, one of the key pieces of high level information is compatibility between the two items. In particular, a board usually exposes one or more "interconnects", the physical location/type of connections available, and their assigned possible uses (e.g. GPIO, power, ground, i2c, etc). Similarly, a shield is usually designed around one (or sometimes more) "interconnects" that allow it to connect to one of those boards.

In ZMK, we encode both of those scenarios with the `exposes` and `requires` properties, respectively. For example, for a Corne shield that requires a Pro Micro compatible controller to function, and simultaneously exposes a four pin header to be used by standard i2c OLED modules, the metadata file contains:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ A non-`complete` position map can be used to assign mappings to only these parti
};
```

This is noticably simpler to write, and can be a useful way of saving flash space for memory-constrained devices.
This is noticeably simpler to write, and can be a useful way of saving flash space for memory-constrained devices.

#### Additional example: corne

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/development/local-toolchain/setup/container.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ created and mounted. Accordingly, you first have to remove the old ones.
--security-opt label=disable \
--workdir /workspaces/zmk \
-v /path/to/zmk:/workspaces/zmk \
-v /path/to/zmk-config:/workspaces/zmk-config \ # Removeable
-v /path/to/zmk-modules:/workspaces/zmk-modules \ # Removeable
-v /path/to/zmk-config:/workspaces/zmk-config \ # Removable
-v /path/to/zmk-modules:/workspaces/zmk-modules \ # Removable
-p 3000:3000 \
<container-name> /bin/bash
```
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/development/studio-rpc-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ block-beta

### Example Encoding (Escaping)

When the message content includes any of the special bytes, those bytes are escaped whe framed
When the message content includes any of the special bytes, those bytes are escaped when framed

```mermaid
block-beta
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/keymaps/behaviors/sticky-key.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Some typists may find that using a sticky shift key interspersed with rapid typi

By default, sticky keys are activated on press until another key is pressed. You can enable the `lazy` setting to instead activate the sticky key right _before_ the other key is pressed. This is useful for mouse interaction or situations where you don't want the host to see anything during a sticky-key timeout, for example `&sk LGUI`, which can trigger a menu if pressed alone.

Note that tapping a lazy sticky key will not trigger other behaviors such as the release of other sticky keys or layers. If you want to use a lazy sticky key to activate the release of a sticky layer, potential solutions include wrappping the sticky key in a simple macro which presses the sticky behavior around the sticky key press, doing the same with `&mo LAYER`, or triggering a tap of some key like `K_CANCEL` on sticky key press.
Note that tapping a lazy sticky key will not trigger other behaviors such as the release of other sticky keys or layers. If you want to use a lazy sticky key to activate the release of a sticky layer, potential solutions include wrapping the sticky key in a simple macro which presses the sticky behavior around the sticky key press, doing the same with `&mo LAYER`, or triggering a tap of some key like `K_CANCEL` on sticky key press.

#### `ignore-modifiers`

Expand Down
Loading