refactor: Add more checks to pre-commit

Updated existing pre-commit hooks and added some new hooks:

- Remove trailing whitespace
- Ensure every non-empty file ends with a new line
- Check YAML file validity
- Prevent adding large files
- Ensure any scripts with shebangs are executable

Added a GitHub action to run pre-commit on every commit. Removed any
existing actions which duplicate pre-commit.

Ran pre-commit on the codebase.
This commit is contained in:
Joel Spadin
2023-04-22 23:16:36 -05:00
committed by Pete Johanson
parent 9c4f1e02d1
commit 32ae776c42
247 changed files with 759 additions and 797 deletions

View File

@@ -16,4 +16,4 @@ properties:
description: The default time to wait (in milliseconds) before triggering the next behavior in the macro bindings list.
tap-ms:
type: int
description: The default time to wait (in milliseconds) between the press and release events on a tapped macro behavior binding
description: The default time to wait (in milliseconds) between the press and release events on a tapped macro behavior binding

View File

@@ -13,4 +13,4 @@ properties:
required: true
tapping-term-ms:
type: int
default: 200
default: 200

View File

@@ -8,54 +8,54 @@ compatible: "gooddisplay,il0323"
include: spi-device.yaml
properties:
height:
type: int
required: true
description: Height in pixel of the panel driven by the controller
height:
type: int
required: true
description: Height in pixel of the panel driven by the controller
width:
type: int
required: true
description: Width in pixel of the panel driven by the controller
width:
type: int
required: true
description: Width in pixel of the panel driven by the controller
reset-gpios:
type: phandle-array
required: true
description: RESET pin.
reset-gpios:
type: phandle-array
required: true
description: RESET pin.
The RESET pin of GD7965 is active low.
If connected directly the MCU pin should be configured
as active low.
The RESET pin of GD7965 is active low.
If connected directly the MCU pin should be configured
as active low.
dc-gpios:
type: phandle-array
required: true
description: DC pin.
dc-gpios:
type: phandle-array
required: true
description: DC pin.
The DC pin of GD7965 is active low (transmission command byte).
If connected directly the MCU pin should be configured
as active low.
The DC pin of GD7965 is active low (transmission command byte).
If connected directly the MCU pin should be configured
as active low.
busy-gpios:
type: phandle-array
required: true
description: BUSY pin.
busy-gpios:
type: phandle-array
required: true
description: BUSY pin.
The BUSY pin of GD7965 is active low.
If connected directly the MCU pin should be configured
as active low.
The BUSY pin of GD7965 is active low.
If connected directly the MCU pin should be configured
as active low.
pwr:
type: uint8-array
required: true
description: Power Setting (PWR) values
pwr:
type: uint8-array
required: true
description: Power Setting (PWR) values
cdi:
type: int
required: true
description: VCOM and data interval value
cdi:
type: int
required: true
description: VCOM and data interval value
tcon:
type: int
required: true
description: TCON setting value
tcon:
type: int
required: true
description: TCON setting value

View File

@@ -5,4 +5,4 @@ description: Set Macro To Press Mode
compatible: "zmk,macro-control-mode-press"
include: zero_param.yaml
include: zero_param.yaml

View File

@@ -5,4 +5,4 @@ description: Set Macro To Release Mode
compatible: "zmk,macro-control-mode-release"
include: zero_param.yaml
include: zero_param.yaml

View File

@@ -5,4 +5,4 @@ description: Set Macro Tap Duration
compatible: "zmk,macro-control-tap-time"
include: one_param.yaml
include: one_param.yaml

View File

@@ -5,4 +5,4 @@ description: Set Macro Wait Duration
compatible: "zmk,macro-control-wait-time"
include: one_param.yaml
include: one_param.yaml

View File

@@ -5,4 +5,4 @@ description: Macro Pause Until Release Marker
compatible: "zmk,macro-pause-for-release"
include: zero_param.yaml
include: zero_param.yaml

View File

@@ -22,4 +22,4 @@ child-binding:
type: boolean
layers:
type: array
default: [-1]
default: [-1]