chore: move coding guidelines from .github to docs/ (#358)

* Reorganized repository documentation and updated internal configuration to reference the new docs location.
Documentation
* Updated contributor and instruction guides to point to the relocated documentation files so links and references remain correct.
---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: softhack007 <91616163+softhack007@users.noreply.github.com>
This commit is contained in:
Copilot
2026-04-07 19:02:20 +02:00
committed by GitHub
parent e4c8e349da
commit 64529bbd84
7 changed files with 17 additions and 15 deletions

View File

@@ -3,10 +3,10 @@
# CodeRabbit configuration — references existing guideline files to avoid # CodeRabbit configuration — references existing guideline files to avoid
# duplicating conventions. See: # duplicating conventions. See:
# .github/copilot-instructions.md — project overview & general rules # .github/copilot-instructions.md — project overview & general rules
# .github/cpp.instructions.md — C++ coding conventions # docs/cpp.instructions.md — C++ coding conventions
# .github/web.instructions.md — Web UI coding conventions # docs/web.instructions.md — Web UI coding conventions
# .github/cicd.instructions.md — GitHub Actions / CI-CD conventions # docs/cicd.instructions.md — GitHub Actions / CI-CD conventions
# .github/esp-idf.instructions.md — ESP-IDF / chip-specific coding guidelines # docs/esp-idf.instructions.md — ESP-IDF / chip-specific coding guidelines
# (apply when code directly uses ESP-IDF APIs: # (apply when code directly uses ESP-IDF APIs:
# esp_idf_*, I2S, RMT, ADC, GPIO, heap_caps, etc.) # esp_idf_*, I2S, RMT, ADC, GPIO, heap_caps, etc.)
# #
@@ -20,11 +20,11 @@ reviews:
path_instructions: path_instructions:
- path: "**/*.{cpp,h,hpp,ino}" - path: "**/*.{cpp,h,hpp,ino}"
instructions: > instructions: >
Follow the C++ coding conventions documented in .github/cpp.instructions.md Follow the C++ coding conventions documented in docs/cpp.instructions.md
and the general project guidelines in .github/copilot-instructions.md. and the general project guidelines in .github/copilot-instructions.md.
If the code under review directly uses ESP-IDF APIs (e.g. heap_caps_malloc, If the code under review directly uses ESP-IDF APIs (e.g. heap_caps_malloc,
I2S, RMT, ADC, GPIO, esp_timer, or any esp_idf_* / soc_* symbols), also I2S, RMT, ADC, GPIO, esp_timer, or any esp_idf_* / soc_* symbols), also
apply the guidelines in .github/esp-idf.instructions.md. apply the guidelines in docs/esp-idf.instructions.md.
Key rules: 2-space indentation (no tabs), camelCase functions/variables, Key rules: 2-space indentation (no tabs), camelCase functions/variables,
PascalCase classes, UPPER_CASE macros. Mark WLED-MM-specific changes with PascalCase classes, UPPER_CASE macros. Mark WLED-MM-specific changes with
@@ -36,7 +36,7 @@ reviews:
- path: "wled00/data/**" - path: "wled00/data/**"
instructions: > instructions: >
Follow the web UI conventions documented in .github/web.instructions.md. Follow the web UI conventions documented in docs/web.instructions.md.
Key rules: indent HTML and JavaScript with tabs, CSS with tabs or spaces. Key rules: indent HTML and JavaScript with tabs, CSS with tabs or spaces.
Files here are built into wled00/html_*.h by tools/cdata.js — never Files here are built into wled00/html_*.h by tools/cdata.js — never
@@ -54,11 +54,11 @@ reviews:
Each usermod lives in its own directory under usermods/ and is implemented Each usermod lives in its own directory under usermods/ and is implemented
as a .h file that is pulled in by wled00/usermods_list.cpp (guarded by as a .h file that is pulled in by wled00/usermods_list.cpp (guarded by
#ifdef). Usermods do not use library.json. Follow the same C++ conventions #ifdef). Usermods do not use library.json. Follow the same C++ conventions
as the core firmware (.github/cpp.instructions.md). as the core firmware (docs/cpp.instructions.md).
- path: ".github/workflows/*.{yml,yaml}" - path: ".github/workflows/*.{yml,yaml}"
instructions: > instructions: >
Follow the CI/CD conventions documented in .github/cicd.instructions.md. Follow the CI/CD conventions documented in docs/cicd.instructions.md.
Key rules: 2-space indentation, descriptive name: on every workflow/job/step. Key rules: 2-space indentation, descriptive name: on every workflow/job/step.
Third-party actions must be pinned to a specific version tag — branch pins Third-party actions must be pinned to a specific version tag — branch pins
@@ -67,7 +67,7 @@ reviews:
into run: steps — pass them through an env: variable to prevent script into run: steps — pass them through an env: variable to prevent script
injection. Do not use pull_request_target unless fully justified. injection. Do not use pull_request_target unless fully justified.
- path: ".github/*.instructions.md" - path: "**/*.instructions.md"
instructions: | instructions: |
This file contains both AI-facing rules and human-only reference sections. This file contains both AI-facing rules and human-only reference sections.
Human-only sections are enclosed in `<!-- HUMAN_ONLY_START -->` / Human-only sections are enclosed in `<!-- HUMAN_ONLY_START -->` /

View File

@@ -54,6 +54,7 @@ tl;dr:
* Auto-generated headers: `wled00/html_*.h` and `wled00/js_*.h`**never edit or commit**. * Auto-generated headers: `wled00/html_*.h` and `wled00/js_*.h`**never edit or commit**.
* ArduinoJSON + AsyncJSON: `wled00/src/dependencies/json` (included via `wled.h`). CI/CD: `.github/workflows/`. * ArduinoJSON + AsyncJSON: `wled00/src/dependencies/json` (included via `wled.h`). CI/CD: `.github/workflows/`.
* Usermods: `usermods/` (`.h` files, included via `usermods_list.cpp`). * Usermods: `usermods/` (`.h` files, included via `usermods_list.cpp`).
* Contributor docs: `docs/` (coding guidelines, design docs).
Main development trunk: `mdev` branch. Make PRs against this branch. Main development trunk: `mdev` branch. Make PRs against this branch.
@@ -77,6 +78,7 @@ tools/ # Build tools (Node.js), partition files, and generi
tools/cdata.js # Web UI → header build script tools/cdata.js # Web UI → header build script
tools/cdata-test.js # Test suite tools/cdata-test.js # Test suite
package.json # Node.js scripts and release ID package.json # Node.js scripts and release ID
docs/ # Contributor docs: coding guidelines and design documentation
.github/workflows/ # CI/CD pipelines .github/workflows/ # CI/CD pipelines
``` ```
@@ -95,7 +97,7 @@ package.json # Node.js scripts and release ID
- **C++ formatting available**: `clang-format` is installed but not in CI - **C++ formatting available**: `clang-format` is installed but not in CI
- No automated linting is configured — match existing code style in files you edit. - No automated linting is configured — match existing code style in files you edit.
See `cpp.instructions.md`, `esp-idf.instructions.md` and `web.instructions.md` for language-specific conventions, and `cicd.instructions.md` for GitHub Actions workflows. See `docs/cpp.instructions.md`, `docs/esp-idf.instructions.md` and `docs/web.instructions.md` for language-specific conventions, and `docs/cicd.instructions.md` for GitHub Actions workflows.
### Attribution for AI-generated code ### Attribution for AI-generated code
Using AI-generated code can hide the source of the inspiration / knowledge / sources it used. Using AI-generated code can hide the source of the inspiration / knowledge / sources it used.

View File

@@ -76,9 +76,9 @@ When in doubt, it is easiest to replicate the code style you find in the files y
Our review bot (coderabbit) has learned lots of detailed guides and hints - it will suggest them automatically when you submit a PR for review. Our review bot (coderabbit) has learned lots of detailed guides and hints - it will suggest them automatically when you submit a PR for review.
If you are curious, these are the detailed guides: If you are curious, these are the detailed guides:
* [C++ Coding](https://github.com/MoonModules/WLED-MM/blob/mdev/.github/cpp.instructions.md) * [C++ Coding](https://github.com/MoonModules/WLED-MM/blob/mdev/docs/cpp.instructions.md)
* [WebUi: HTML, JS, CSS](https://github.com/MoonModules/WLED-MM/blob/mdev/.github/web.instructions.md) * [WebUi: HTML, JS, CSS](https://github.com/MoonModules/WLED-MM/blob/mdev/docs/web.instructions.md)
* [Using ESP-IDF directly](https://github.com/MoonModules/WLED-MM/blob/mdev/.github/esp-idf.instructions.md) * [Using ESP-IDF directly](https://github.com/MoonModules/WLED-MM/blob/mdev/docs/esp-idf.instructions.md)
Below are the main rules used the WLED-MM repository. Below are the main rules used the WLED-MM repository.