From 246493f237230dc255ebc76da937edf3f206f52c Mon Sep 17 00:00:00 2001 From: Colin Brown Date: Wed, 25 Feb 2026 11:08:22 +0000 Subject: [PATCH 1/6] Add linting configuration for Markdown and YAML files --- .github/workflows/lint.yml | 23 +++++++++++++++++++++++ .markdownlint.yaml | 8 ++++++++ .yamllint.yaml | 14 ++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 .github/workflows/lint.yml create mode 100644 .markdownlint.yaml create mode 100644 .yamllint.yaml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..c5d2a09 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,23 @@ +name: Lint + +on: + push: + pull_request: + +jobs: + markdownlint: + name: Markdown + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: DavidAnson/markdownlint-cli2-action@v19 + with: + globs: "**/*.md" + + yamllint: + name: YAML + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: pip install yamllint + - run: yamllint . diff --git a/.markdownlint.yaml b/.markdownlint.yaml new file mode 100644 index 0000000..4204143 --- /dev/null +++ b/.markdownlint.yaml @@ -0,0 +1,8 @@ +default: true + +# Line length — relaxed to accommodate the ASCII circuit diagram +# and table rows which can be naturally wide +MD013: + line_length: 120 + code_blocks: false # don't enforce line length inside fenced code blocks + tables: false # don't enforce line length inside tables diff --git a/.yamllint.yaml b/.yamllint.yaml new file mode 100644 index 0000000..a476bb2 --- /dev/null +++ b/.yamllint.yaml @@ -0,0 +1,14 @@ +extends: default + +rules: + # ESPHome configs use inline comments for documentation — give them room + line-length: + max: 120 + + # ESPHome uses bare true/false — the strict 'truthy' rule flags these + truthy: + allowed-values: ["true", "false", "yes", "no", "on", "off"] + check-keys: false + + # ESPHome files often have multiple docs or no explicit document start + document-start: disable From d5a07c009577a8c73ef950bec66cfb0b7e210455 Mon Sep 17 00:00:00 2001 From: Colin Brown Date: Wed, 25 Feb 2026 11:10:27 +0000 Subject: [PATCH 2/6] Fix formatting in README for better readability --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9ba8c96..57ec4b1 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,8 @@ PixelBrain32 is a personal ESP32-based controller for addressable LED strips, designed for use with ESPHome and Home Assistant. -It's a small custom PCB that powers an ESP32 from the same 5 V supply as the LEDs, provides proper signal conditioning and level shifting for WS2812-style strips, and exposes a physical button for local control. +It's a small custom PCB that powers an ESP32 from the same 5 V supply as the LEDs, provides proper signal conditioning +and level shifting for WS2812-style strips, and exposes a physical button for local control. --- From 3e99d6726c78ed9fd1d01bf3d76163d369b29aa9 Mon Sep 17 00:00:00 2001 From: Colin Brown Date: Wed, 25 Feb 2026 11:13:31 +0000 Subject: [PATCH 3/6] Fix linting workflow triggers and update YAML linting configuration --- .github/workflows/lint.yml | 2 +- .yamllint.yaml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c5d2a09..dedcd2c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,6 +1,6 @@ name: Lint -on: +"on": push: pull_request: diff --git a/.yamllint.yaml b/.yamllint.yaml index a476bb2..31a6f83 100644 --- a/.yamllint.yaml +++ b/.yamllint.yaml @@ -1,5 +1,8 @@ extends: default +ignore: | + .markdownlint.yaml + rules: # ESPHome configs use inline comments for documentation — give them room line-length: From b46dcad83e06fd294ef94db4cf5025a46bb24a8a Mon Sep 17 00:00:00 2001 From: Colin Brown Date: Wed, 25 Feb 2026 11:17:09 +0000 Subject: [PATCH 4/6] Update YAML linting command to use GitHub format and clean up .yamllint.yaml rules --- .github/workflows/lint.yml | 2 +- .yamllint.yaml | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index dedcd2c..c67fbb8 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -20,4 +20,4 @@ jobs: steps: - uses: actions/checkout@v4 - run: pip install yamllint - - run: yamllint . + - run: yamllint --format github . diff --git a/.yamllint.yaml b/.yamllint.yaml index 31a6f83..94740e7 100644 --- a/.yamllint.yaml +++ b/.yamllint.yaml @@ -4,14 +4,8 @@ ignore: | .markdownlint.yaml rules: - # ESPHome configs use inline comments for documentation — give them room line-length: max: 120 - - # ESPHome uses bare true/false — the strict 'truthy' rule flags these truthy: - allowed-values: ["true", "false", "yes", "no", "on", "off"] check-keys: false - - # ESPHome files often have multiple docs or no explicit document start document-start: disable From dc8e8bd52677bd43e535d312a24bd7c4d6c147fd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 25 Feb 2026 11:18:39 +0000 Subject: [PATCH 5/6] Initial plan From 57da64e0f5406ca655528cc162dd4fa2f0b7733c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 25 Feb 2026 11:20:01 +0000 Subject: [PATCH 6/6] Fix CRLF line endings in YAML files and add .gitattributes to enforce LF Co-authored-by: colinmakerofthings <66311935+colinmakerofthings@users.noreply.github.com> --- .gitattributes | 1 + .github/workflows/lint.yml | 46 +++++++++++++++++++------------------- .markdownlint.yaml | 16 ++++++------- .yamllint.yaml | 22 +++++++++--------- 4 files changed, 43 insertions(+), 42 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..6313b56 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto eol=lf diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c67fbb8..3a57ab1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,23 +1,23 @@ -name: Lint - -"on": - push: - pull_request: - -jobs: - markdownlint: - name: Markdown - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: DavidAnson/markdownlint-cli2-action@v19 - with: - globs: "**/*.md" - - yamllint: - name: YAML - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - run: pip install yamllint - - run: yamllint --format github . +name: Lint + +"on": + push: + pull_request: + +jobs: + markdownlint: + name: Markdown + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: DavidAnson/markdownlint-cli2-action@v19 + with: + globs: "**/*.md" + + yamllint: + name: YAML + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: pip install yamllint + - run: yamllint --format github . diff --git a/.markdownlint.yaml b/.markdownlint.yaml index 4204143..c6baa28 100644 --- a/.markdownlint.yaml +++ b/.markdownlint.yaml @@ -1,8 +1,8 @@ -default: true - -# Line length — relaxed to accommodate the ASCII circuit diagram -# and table rows which can be naturally wide -MD013: - line_length: 120 - code_blocks: false # don't enforce line length inside fenced code blocks - tables: false # don't enforce line length inside tables +default: true + +# Line length — relaxed to accommodate the ASCII circuit diagram +# and table rows which can be naturally wide +MD013: + line_length: 120 + code_blocks: false # don't enforce line length inside fenced code blocks + tables: false # don't enforce line length inside tables diff --git a/.yamllint.yaml b/.yamllint.yaml index 94740e7..528150d 100644 --- a/.yamllint.yaml +++ b/.yamllint.yaml @@ -1,11 +1,11 @@ -extends: default - -ignore: | - .markdownlint.yaml - -rules: - line-length: - max: 120 - truthy: - check-keys: false - document-start: disable +extends: default + +ignore: | + .markdownlint.yaml + +rules: + line-length: + max: 120 + truthy: + check-keys: false + document-start: disable