Skip to content

Conversation

@erpepe2004
Copy link

@erpepe2004 erpepe2004 commented Dec 12, 2025

Summary by CodeRabbit

  • Documentation

    • Added comprehensive Spanish-language documentation suite including installation guides, API reference, advanced compilation, quick reference, and complete feature documentation.
    • Updated README with bilingual English/Spanish content for broader accessibility.
    • Added new documentation index and navigation guides for Spanish-speaking users.
  • Chores

    • Reformatted configuration files and workflows for consistency.
    • Added translation tooling for internal comment localization.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 12, 2025

Walkthrough

This PR introduces extensive Spanish-language documentation for WLED, applies comprehensive localization to code comments and strings, normalizes formatting across configuration and workflow files, adds new translation utility tools, and updates library headers with new public API declarations while maintaining backward compatibility.

Changes

Cohort / File(s) Summary
Configuration & Environment Setup
.devcontainer/Dockerfile, .devcontainer/devcontainer.json, .envrc, .gitpod.Dockerfile, .gitpod.yml, .nvmrc, .vscode/tasks.json
Uncommented Dockerfile header line, normalized whitespace/formatting in devcontainer configurations, replaced deprecated layout directive in .envrc, added blank line in Gitpod Dockerfile.
GitHub Workflows
.github/workflows/build.yml, .github/workflows/nightly.yml, .github/workflows/pr-merge.yaml, .github/workflows/release.yml, .github/workflows/stale.yml, .github/workflows/test.yaml, .github/workflows/usermods.yml, .github/workflows/wled-ci.yml
Normalized YAML formatting, reindentation, and whitespace adjustments across all workflow files without functional logic changes.
GitHub Issue Templates & Settings
.github/ISSUE_TEMPLATE/bug.yml, .github/ISSUE_TEMPLATE/config.yml, .github/ISSUE_TEMPLATE/feature_request.md, .github/FUNDING.yml
Updated issue template formatting, revised community forum description text, normalized YAML structure.
Documentation & Localization
.github/copilot-instructions.md, CODE_OF_CONDUCT.md, CONTRIBUTING.md, LICENSE, readme.md, include/README, lib/README, test/README
Restructured copilot instructions to focus on architecture overview, localized CODE_OF_CONDUCT and CONTRIBUTING with markup adjustments, reflowed LICENSE content, rewrote readme.md with bilingual English/Spanish content.
Spanish Language Documentation (New)
DOCUMENTACION_ES.md, DOCUMENTACION_ES_INICIO.md, GUIA_RAPIDA_ES.md, INDICE_DOCUMENTACION_ES.md, INSTALACION_ESP8266_ES.md, API_REFERENCIA_ES.md, COMPILACION_AVANZADA_ES.md, ACTUALIZACIONES_COMPONENTES_ES.md, REFERENCIA_RAPIDA_ES.md, RESUMEN_DOCUMENTACION_ES.md, RESUMEN_DOCUMENTACION_ACTUALIZADO.md
Added comprehensive Spanish-language documentation covering installation, quick start guides, API reference, advanced compilation, component updates, and documentation indices.
Utility Documentation (New)
TRABAJO_COMPLETADO_USUARIO.txt, __comandosGit.md
Added user task completion documentation and Git command reference guide in Spanish.
NeoESP32RmtHI Library Updates
lib/NeoESP32RmtHI/include/NeoEsp32RmtHIMethod.h, lib/NeoESP32RmtHI/src/NeoEsp32RmtHIMethod.cpp, lib/NeoESP32RmtHI/library.json, lib/NeoESP32RmtHI/src/NeoEsp32RmtHI.S
Added public WaitForTxDone function declaration, extensively localized comments and documentation to Spanish/Portuguese, reformatted JSON library configuration.
Core Library Localization
lib/ESP8266PWM/src/core_esp8266_waveform_phase.cpp
Translated extensive English comments and identifiers to Spanish/Portuguese without logic changes.
Build Scripts & Configuration
pio-scripts/build_ui.py, pio-scripts/load_usermods.py, pio-scripts/obj-dump.py, pio-scripts/output_bins.py, pio-scripts/set_metadata.py, pio-scripts/strip-floats.py, pio-scripts/user_config_copy.py, pio-scripts/validate_modules.py
Normalized import ordering, whitespace adjustments, and code reformatting across all PlatformIO scripts without functional logic changes.
PlatformIO Configuration
platformio.ini, platformio_override.sample.ini, requirements.in, requirements.txt
Fully localized platformio.ini to Spanish (comments and documentation only), reformatted override sample, adjusted whitespace in requirements files.
Board Configuration
boards/adafruit_matrixportal_esp32s3_wled.json, boards/lilygo-t7-s3.json
Preserved JSON content with formatting/newline adjustments.
Translation & Localization Tools (New)
tools/check-translations.js, tools/translate-comments.js, tools/translate-all-comments.js
Added new Node.js utilities for translating code comments with bilingual dictionaries, directory scanning, and case-preserving replacement logic.
Other Tools & Utilities
tools/all_xml.sh, tools/cdata-test.js, tools/cdata.js, tools/fps_test.htm, tools/json_test.htm, tools/multi-update.cmd, tools/multi-update.sh, tools/stress_test.sh
Localized comments to Spanish, adjusted whitespace formatting, relocated script block in json_test.htm.
Miscellaneous Configuration
.gitignore, package.json, images/Readme.md
Removed root-slash anchors in gitignore patterns, preserved package.json content, adjusted whitespace in images README.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

  • Multiple areas requiring focused attention:
    • NeoESP32RmtHI library API addition: Review the new WaitForTxDone function signature and its integration with existing RMT driver interfaces; verify compatibility with both ESP32 and ESP32-S3 variants.
    • Gitignore pattern changes: Verify that removing root-slash anchors (/wled00/extLibswled00/extLibs) does not inadvertently ignore paths outside the intended directories or create security concerns.
    • Spanish documentation completeness: Cross-reference new Spanish docs for consistency, accuracy of technical terminology, and proper linking between documents; validate code examples and command sequences.
    • Translation tool correctness: Review dictionary mappings in translation scripts for false positives or missed translations; verify case-preservation logic handles edge cases correctly.
    • GitHub workflow and issue template semantics: Ensure whitespace-only changes do not alter YAML parsing or GitHub Actions behavior.
    • Copilot instructions restructuring: Verify the architectural overview is clear, accurate, and preserves all essential guidance for maintainers.
    • json_test.htm script relocation: Confirm moving script block outside HTML root does not break functionality or cause parsing errors.

Possibly related PRs

Suggested reviewers

  • blazoncek
  • willmmiles
  • softhack007

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 36.14% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive The title 'Feature/sinricpro' is overly vague and generic. It uses a branch-naming convention rather than describing the actual changes, which include extensive Spanish documentation additions, localization of comments, bug fixes, and configuration updates. Revise the title to clearly describe the primary changes, such as 'Add Spanish documentation and localize codebase' or 'Add SinricPro integration with documentation updates and comment localization' to better reflect the changeset scope.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Author

@erpepe2004 erpepe2004 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feature/sinricpro

Copy link
Author

@erpepe2004 erpepe2004 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feature/sinricpro

Copy link
Author

@erpepe2004 erpepe2004 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feature/sinricpro

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

Note

Due to the large number of review comments, Critical severity comments were prioritized as inline comments.

🟠 Major comments (21)
CONTRIBUTING.md-1-127 (1)

1-127: Fix multiple markdown and grammar linting violations.

The admonition syntax update to GitHub callouts (>) is good, but several markdown and grammar issues need addressing:

  1. Line 28: Remove blank line inside blockquote (MD028)
  2. Line 32: Wrap bare URL in angle brackets: <https://github.com/wled-dev/WLED/wiki/...>
  3. Lines 45–49: Fix unordered list indentation (expected 0 spaces, actual 2):
    #### best practice with AI:
    -  * As the person who contributes...
    +* As the person who contributes...
    -  * best practice: add a comment...
    +* best practice: add a comment...
  4. Lines 45, 48: Add hyphens to compound modifiers: AI-generated code instead of AI generated code
  5. Line 111: Specify language for fenced code block (e.g., ```cpp instead of ```)

These fixes will align the file with markdown best practices and improve readability.

tools/json_test.htm-76-100 (1)

76-100: Move <script> back inside the document + fix “Bad JSON” overwrite

Right now the <script> sits after </html> which is invalid HTML and can break execution in some environments. Also "Bad JSON" is immediately overwritten.

-</body>
-</html>
-
-<script>
+  <script>
 function rq(cm)
 {
   var h = new XMLHttpRequest();
   h.open(cm, document.cf.cu.value, true);
   h.onreadystatechange = function()
   {
     if(h.readyState == 4)
     {
       if(h.status==200)
       {
-        document.cf.rsp.value="Bad JSON: "+h.responseText
-        document.cf.rsp.value=JSON.stringify(JSON.parse(h.responseText), null, '\t');
+        try {
+          document.cf.rsp.value = JSON.stringify(JSON.parse(h.responseText), null, '\t');
+        } catch (e) {
+          document.cf.rsp.value = "Bad JSON: " + h.responseText;
+        }
       }
       else
       {
         document.cf.rsp.value="Error "+h.status+"\r\n\n"+h.responseText;
       }
     }
   }
   h.send(document.cf.bd.value);
 }
 </script>
+</body>
+</html>

Committable suggestion skipped: line range outside the PR's diff.

tools/all_xml.sh-1-17 (1)

1-17: Fix CRLF + build curl args as a real array (quoting/robustness)

Shellcheck is flagging CRLF and unsafe splitting; current read -a TARGETS <<< $(replicate) is also fragile. Suggest rewriting like this:

-#!/bin/bash
+#!/usr/bin/env bash
+set -euo pipefail
 # Pull all settings pages for comparison
-HOST=$1
-TGT_PATH=$2
-CURL_ARGS="--compressed"
+HOST="${1:?HOST required}"
+TGT_PATH="${2:?TGT_PATH required}"
+CURL_ARGS=(--compressed)
 
-# Replicate one target many times
-function replicate() {
-  for i in {0..10}
-  do  
-    echo -n " http://${HOST}/settings.js?p=$i -o ${TGT_PATH}/$i.xml"
-  done
-}
-read -a TARGETS <<< $(replicate)
+TARGETS=()
+for i in {0..10}; do
+  TARGETS+=("http://${HOST}/settings.js?p=${i}" -o "${TGT_PATH}/${i}.xml")
+done
 
-mkdir -p ${TGT_PATH}
-curl ${CURL_ARGS} ${TARGETS[@]}
+mkdir -p -- "${TGT_PATH}"
+curl "${CURL_ARGS[@]}" "${TARGETS[@]}"
tools/stress_test.sh-1-38 (1)

1-38: This script currently trips Shellcheck hard (CRLF + array/comma + word-splitting)

Even if this PR only reformats, the current file has real footguns:

  • CRLF everywhere (SC1017).
  • JSON_TARGETS contains a comma between elements (Line 20) ('json/si', 'json/palettes') which is almost certainly unintended.
  • Multiple unsafe expansions ($(replicate ...), TARGETS=(${TARGET_STR[@]}), curl ${CURL_ARGS} ${FULL_TGT_OPTIONS}) will word-split/glob unexpectedly.

If you want, I can propose a minimal “safe bash arrays” rewrite (mapfile/readarray + curl "${CURL_ARGS[@]}" "${URLS[@]}").

tools/cdata-test.js-120-138 (1)

120-138: High CI flake risk: wall-clock thresholds + random deletion

  • checkIfFileWasNewlyCreated() asserts Date.now() - mtimeMs < 500 (Line 122): too tight under CI load, Windows FS timestamp granularity, and VM jitter.
  • “random html_*.h” deletion (Lines 151-155) makes failures non-reproducible.
  • The “2x faster” runtime assertion (Lines 199-210) is extremely environment-dependent.

Suggestions:

  • Replace the 500ms threshold with a larger bound (or compare against “start time” captured right before the command).
  • Delete a deterministic known header (e.g., html_ui.h) or sort+pick first.
  • Replace runtime-based “no rebuild” with a content/mtime-based assertion on outputs.

Also applies to: 140-192, 194-210

tools/cdata-test.js-81-97 (1)

81-97: Test teardown can destroy a working tree if setup partially fails

before() copies wled00/data, tools/cdata.js, package.json, then after() unconditionally deletes/renames. If before() fails mid-way (or a prior run left artifacts), the restore path can delete real files or fail in a way that leaves the repo mutated.

Consider:

  • Guarding with “backup exists” checks before rm/rename
  • Using a temp dir (e.g., fs.mkdtempSync) and restoring only if backups were created
  • Using { force: true } where appropriate to reduce cascading failures
pio-scripts/load_usermods.py-1-47 (1)

1-47: Potential type bug when appending to lib_deps

env.GetProjectOption('lib_deps') + symlinks (Line 46) will break if lib_deps is returned as a string (common in PlatformIO configs). Safer to normalize to a list before concatenation.

Example:

-  env.GetProjectConfig().set("env:" + env['PIOENV'], 'lib_deps', env.GetProjectOption('lib_deps') + symlinks)
+  existing = env.GetProjectOption('lib_deps')
+  if isinstance(existing, str):
+    existing = existing.split()
+  env.GetProjectConfig().set("env:" + env['PIOENV'], 'lib_deps', list(existing) + symlinks)
tools/multi-update.sh-1-19 (1)

1-19: Shell script robustness: CRLF + quoting + curl safety

  • Shellcheck reports literal CRLF across the file → normalize to LF.
  • Quote variables/paths ("$FWPATH/$2", "$1") to avoid word-splitting/globbing.
  • Add curl timeouts and fail-fast (--fail --show-error --connect-timeout ... --max-time ...) so update loops don’t hang silently.

Example tightening:

-if [ -f $FWPATH/$2 ]; then
-	ping -c 1 $1 >/dev/null
+if [ -f "$FWPATH/$2" ]; then
+	ping -c 1 "$1" >/dev/null
 	PINGRESULT=$?
 	if [ $PINGRESULT -eq 0 ]; then
-		echo Updating $1
-		curl -s -F "update=@${FWPATH}/$2" $1/update >/dev/null
+		echo "Updating $1"
+		curl --fail --show-error -sS --connect-timeout 5 --max-time 60 \
+		  -F "update=@${FWPATH}/$2" "http://$1/update" >/dev/null
 		return 0
 	fi
 	return 1
 fi
requirements.txt-47-54 (1)

47-54: Pinned dependencies have HIGH OSV findings (Starlette, urllib3)

OSV Scanner flags:

  • starlette==0.45.3 (Line 47) with two HIGH DoS advisories (CVE-2025-62727 ReDoS in Range header parsing, CVE-2025-54121 multipart file rollover blocking)
  • urllib3==2.5.0 (Line 53) with one HIGH advisory (CVE-2025-66418 unbounded decompression chain DoS; note: the redirect issues CVE-2025-50181/50182 are Medium severity and were fixed in this version)

Upgrade to starlette ≥0.49.1 and urllib3 ≥2.6.0, or document why these versions are acceptable/transitively constrained by PlatformIO and re-run the vuln scan.

.github/workflows/release.yml-1-38 (1)

1-38: Fix release workflow: outdated action version + YAML boolean + LF newlines

  • softprops/action-gh-release@v1 is outdated (current maintained version is v2.5.0) → bump to @v2.
  • draft: True (Line 34) uses capitalized boolean; change to draft: true for YAML 1.2 compliance.
  • File uses CRLF line endings; normalize to LF and remove trailing blank lines.

Proposed diff:

-    - name: Create draft release
-      uses: softprops/action-gh-release@v1
+    - name: Create draft release
+      uses: softprops/action-gh-release@v2
       with:
         body: ${{ steps.changelog.outputs.changelog }}
-        draft: True
+        draft: true
         files: |
           *.bin
           *.bin.gz

Committable suggestion skipped: line range outside the PR's diff.

.github/workflows/wled-ci.yml-1-11 (1)

1-11: Normalize file to LF to satisfy YAMLlint.
YAMLlint reports “wrong new line character: expected \n”.

.gitpod.yml-1-11 (1)

1-11: Normalize file to LF to satisfy YAMLlint.
YAMLlint reports “wrong new line character: expected \n”.

.github/workflows/build.yml-1-26 (1)

1-26: Normalize file to LF to satisfy YAMLlint.
YAMLlint reports “wrong new line character: expected \n”, which typically means CRLF line endings.

platformio_override.sample.ini-465-472 (1)

465-472: Fix broken build_flags example: missing -D before DATA_PINS.
As written, uncommenting this would pass DATA_PINS=... as a raw compiler argument instead of a define.

-[env:Athom_5Pin_Controller]      ;Analog light strip controller
+;[env:Athom_5Pin_Controller]      ;Analog light strip controller
@@
-build_flags = ${common.build_flags} ${esp8266.build_flags} -D BTNPIN=0 -D RLYPIN=-1 DATA_PINS=4,12,14,13 -D WLED_DISABLE_INFRARED
+build_flags = ${common.build_flags} ${esp8266.build_flags} -D BTNPIN=0 -D RLYPIN=-1 -D DATA_PINS=4,12,14,13 -D WLED_DISABLE_INFRARED

(If the leading ; on the env header is intentional in the sample, ignore that hunk; the key fix is adding -D.)

tools/multi-update.cmd-1-16 (1)

1-16: Quote %FWPATH%/args to avoid breakage with spaces; harden curl invocation.

As written, the script can fail (or behave unexpectedly) if %FWPATH% contains spaces, and the curl URL should also be quoted.

 :UPDATEONE
-IF NOT EXIST %FWPATH%\%2 GOTO SKIP
-	ping -w 1000 -n 1 %1 | find "TTL=" || GOTO SKIP
+IF NOT EXIST "%FWPATH%\%~2" GOTO SKIP
+	ping -w 1000 -n 1 "%~1" | find "TTL=" || GOTO SKIP
 	ECHO Updating %1
-	curl -s -F "update=@%FWPATH%/%2" %1/update >nul
+	curl -s -F "update=@%FWPATH%\%~2" "%~1/update" >nul
 :SKIP
 GOTO:EOF
tools/check-translations.js-5-475 (1)

5-475: Remove duplicate dictionary keys.

The dictionary contains many duplicate keys where later definitions overwrite earlier ones. This causes silent translation errors. The static analysis tool identifies at least 25 duplicate keys including:

  • 'update' (lines 10, 368)
  • 'load' (lines 23, 249)
  • 'push' (lines 51, 389)
  • 'filter' (lines 55, 416)
  • 'index' (lines 72, 382)
  • 'trace' (lines 90, 403)
  • 'log' (lines 91, 398)
  • 'queue' (lines 98, 174)
  • 'handler' (lines 131, 179)
  • 'segment' (lines 155, 245)
  • 'static' (lines 196, 434, 452)
  • 'interface' (lines 274, 331)
  • 'module' (lines 282, 362)
  • 'package' (lines 283, 363)
  • 'template' (lines 299, 462)
  • 'pattern' (lines 298, 418)
  • 'extension' (lines 320, 425)
  • 'user' (lines 352, 427)
  • 'group' (lines 355, 428)
  • 'owner' (lines 354, 427)
  • 'patch' (lines 367, 395)
  • 'merge' (lines 242, 375)

Review the dictionary and remove earlier occurrences if the later translations are correct, or restructure if context-dependent translations are needed.

INSTALACION_ESP8266_ES.md-43-62 (1)

43-62: Remove the git config --global user.* example (leaks personal-style identifiers / off-topic).
Those commands aren’t required for building/flashing and the sample values look like real identity info; recommend removing entirely or replacing with a neutral note (“optional, if contributing”).

GUIA_RAPIDA_ES.md-7-26 (1)

7-26: Remove hardcoded outdated firmware binary version from the flashing example.

The binary filename WLED_0.13.0_ESP32.bin is 2+ major versions outdated (current version is 0.15.0-b7). Replace with a reference to the latest release: "Download the latest release binary for your board from https://github.com/Aircoookie/WLED/releases or use https://install.wled.me" and use a generic placeholder like WLED_latest_ESP32.bin in the example command.

API_REFERENCIA_ES.md-397-405 (1)

397-405: Avoid recommending API keys in query strings (leak-prone); prefer headers if available.
Query params commonly end up in logs, browser history, proxies, and referrers. If WLED supports it, document an Authorization header (or the project’s preferred header) as the primary example, and keep the query-string variant as “legacy / not recommended”.

API_REFERENCIA_ES.md-10-57 (1)

10-57: Fix invalid JSON in the GET /json/state example (currently not parseable).
The example response is missing closing ] / } for "seg" and the root object, and the segment object indentation suggests unbalanced braces. This will break copy/paste for users.

   "seg": [
     {
       "id": 0,
       "start": 0,
       "stop": 120,
       "len": 120,
       "grp": 1,
       "spc": 0,
       "of": 0,
       "on": true,
       "bri": 255,
       "col": [
         [255, 0, 0],
         [0, 255, 0],
         [0, 0, 255]
       ],
       "fx": 5,
       "sx": 128,
       "ix": 128,
       "pal": 0,
       "sel": true,
       "rev": false,
       "cct": 127,
       "lc": false
-  }
-}
+    }
+  ]
+}
COMPILACION_AVANZADA_ES.md-163-182 (1)

163-182: Fix typo that breaks the custom effect example (uint32_t now = now = millis();).
This won’t compile and also shadows the variable incorrectly.

-  uint32_t now = now = millis();       // Tiempo actual
+  uint32_t now = millis();             // Tiempo actual
🟡 Minor comments (29)
pio-scripts/user_config_copy.py-1-1 (1)

1-1: Add noqa comment to prevent future linting issues: Import('env') is injected by SCons at runtime

The Import('env') on line 1 will be flagged as undefined (F821) by Ruff if linting is enabled. While Ruff is not currently enforced in CI, the ruff.toml configuration is present and would catch this if activated. Add a targeted suppression to keep the code lint-ready:

-Import('env')
+Import('env')  # noqa: F821
.github/ISSUE_TEMPLATE/bug.yml-1-86 (1)

1-86: Normalize line endings to LF to satisfy YAMLlint

CI/lint reports wrong new line character: expected \n (likely CRLF). Please re-save this file with LF line endings so YAMLlint and diffs behave cleanly.

tools/cdata.js-1-16 (1)

1-16: Fix incorrect command names in the usage header (avoid misleading docs)

The header says npm run compilación / npm run dev, but package.json defines build/dev. Consider aligning these instructions with the actual script names.

.github/workflows/stale.yml-1-30 (1)

1-30: Normalize workflow file to LF

yamllint reports wrong newline characters (expected \n) → please convert this file to LF line endings to keep CI lint happy.

include/README-2-30 (1)

2-30: Minor formatting/typo issues in code/extension quoting

A few spots use a trailing apostrophe instead of matching backticks/quotes (e.g., #include', .h'). Consider normalizing to Markdown backticks for literals.

test/README-2-7 (1)

2-7: Minor Spanish grammar/casing polish suggested.
E.g., “Las Pruebas Unitarias es…” → “Las pruebas unitarias son…”, and avoid capitalizing common nouns mid-sentence unless intended.

lib/ESP8266PWM/src/core_esp8266_waveform_phase.cpp-304-504 (1)

304-504: Please remove “wtf?” from ISR comments.
Even if internal, this is a critical ISR path; replace with a neutral explanation (“drift accumulation intentionally disabled because …”).

lib/ESP8266PWM/src/core_esp8266_waveform_phase.cpp-1-48 (1)

1-48: Keep header/license block language clean and consistent (avoid mixed ES/PT and typos).
This reads like a partial machine-translation (“plataforma source código”, “resultado”, “Piso”, etc.), which makes future maintenance harder in a core timing file. Consider either: (1) keep original upstream English here, or (2) do a careful Spanish pass with consistent terminology.

.github/ISSUE_TEMPLATE/config.yml-1-11 (1)

1-11: Fix YAML formatting: extra spaces after url: + normalize LF.
This is small, but it avoids YAMLlint noise and potential parsing edge-cases.

-  - name: kno.wled.ge base
-    url:  https://kno.wled.ge/basics/faq/
+  - name: kno.wled.ge base
+    url: https://kno.wled.ge/basics/faq/
.github/workflows/build.yml-22-46 (1)

22-46: Fix shellcheck issues: quote $GITHUB_OUTPUT and replace legacy backticks with $().
Both are style/info-level lints that improve robustness without changing functionality.

-        echo "environments=$(pio project config --json-output | jq -cr '.[0][1][0][1]')" >> $GITHUB_OUTPUT
+        echo "environments=$(pio project config --json-output | jq -cr '.[0][1][0][1]')" >> "$GITHUB_OUTPUT"
@@
-        VERSION=`date +%y%m%d0`
+        VERSION="$(date +%y%m%d0)"
.github/workflows/usermods.yml-34-35 (1)

34-35: Fix typo in job name (“Enviornments” → “Environments”).

.github/workflows/pr-merge.yaml-1-38 (1)

1-38: Fix CRLF line endings (YAMLlint new-lines).

YAMLlint is flagging the file as using the wrong newline character. Please re-save/normalize this workflow as LF (\n) to keep CI green and avoid noisy diffs.

.github/workflows/usermods.yml-25-27 (1)

25-27: Harden find|xargs pipeline per ShellCheck (SC2038/SC2086).

find ... | xargs ... will break on non-trivial names. Consider -print0 | xargs -0 or find ... -exec ... +, and ensure variables/expansions are quoted appropriately in the pipeline.

.github/workflows/usermods.yml-1-74 (1)

1-74: Fix CRLF line endings (YAMLlint new-lines).

Same as pr-merge.yaml: please normalize to LF (\n) to satisfy YAMLlint.

pio-scripts/output_bins.py-18-21 (1)

18-21: Fix mutable default arg in _create_dirs (real bug-footgun).

-def _create_dirs(dirs=["map", "release", "firmware"]):
-    for d in dirs:
+def _create_dirs(dirs=None):
+    if dirs is None:
+        dirs = ["map", "release", "firmware"]
+    for d in dirs:
         os.makedirs(os.path.join(OUTPUT_DIR, d), exist_ok=True)
tools/translate-all-comments.js-5-131 (1)

5-131: Fix duplicate dictionary keys.

The dictionary contains duplicate keys that will cause only the last definition to be used:

  • 'load' appears at line 16 ('cargar') and line 68 ('carga')
  • 'merge' appears at line 67 ('fusionar') and line 106 ('fusión')

This means earlier definitions are silently ignored. Decide which translation is correct for each term, or if different contexts require different translations, consider a more sophisticated translation strategy.

Apply this diff to remove the first occurrences if the later ones are correct:

   'pause': 'pausar', 'resume': 'reanudar', 'save': 'guardar',
-  'load': 'cargar', 'delete': 'eliminar', 'create': 'crear', 'destroy': 'destruir',
+  'delete': 'eliminar', 'create': 'crear', 'destroy': 'destruir',
   'interpolate': 'interpolar', 'extrapolate': 'extrapolar',
-  'blend': 'mezcla', 'combine': 'combinar', 'merge': 'fusionar', 'split': 'dividir',
+  'blend': 'mezcla', 'combine': 'combinar', 'split': 'dividir',
tools/translate-comments.js-5-129 (1)

5-129: Fix duplicate dictionary keys.

The dictionary contains duplicate keys with different translations:

  • 'load' appears at line 15 ('cargar') and line 66 ('carga')
  • 'merge' appears at line 64 ('fusionar') and line 104 ('fusión')

Only the last definition for each key will be used. Remove the earlier occurrences or clarify which translation is intended.

Apply this diff:

   'pause': 'pausar', 'resume': 'reanudar', 'save': 'guardar',
-  'load': 'cargar', 'delete': 'eliminar', 'create': 'crear', 'destroy': 'destruir',
+  'delete': 'eliminar', 'create': 'crear', 'destroy': 'destruir',
   'interpolate': 'interpolar', 'extrapolate': 'extrapolar', 'blend': 'mezcla',
-  'combine': 'combinar', 'merge': 'fusionar', 'split': 'dividir', 'chunk': 'fragmento',
+  'combine': 'combinar', 'split': 'dividir', 'chunk': 'fragmento',
REFERENCIA_RAPIDA_ES.md-73-90 (1)

73-90: Avoid bare URLs; use Markdown links (markdownlint MD034).
Convert the Discord and Wiki lines (and any other bare URLs) to [Discord](...), [Wiki](...).

Also applies to: 195-218, 325-334

CODE_OF_CONDUCT.md-55-76 (1)

55-76: Replace bare URLs with Markdown links (markdownlint MD034).
Lines 58/71/76 contain bare URLs; convert them to [text](url) or reference-style links to satisfy lint and improve scanning.

INSTALACION_ESP8266_ES.md-97-105 (1)

97-105: Don’t recommend cloning a specific user fork in the main install path.
Keep git clone https://github.com/Aircoookie/WLED.git as the primary path; if you want to mention forks, add an optional note (“clone your fork instead”) without naming a specific account.

INDICE_DOCUMENTACION_ES.md-235-241 (1)

235-241: Replace bare URLs with Markdown links (markdownlint MD034).
Discord/Foro/Wiki/GitHub lines should be [Discord](...), etc.

REFERENCIA_RAPIDA_ES.md-96-167 (1)

96-167: Add code-fence languages (markdownlint MD040).
Several fenced blocks are missing a language; use bash, json, text, etc., to satisfy lint and improve rendering.

Also applies to: 170-240, 267-283

INDICE_DOCUMENTACION_ES.md-143-212 (1)

143-212: Add a language to fenced “diagrams/trees” (markdownlint MD040).
Use ```text for the ASCII maps/trees to satisfy lint and keep formatting stable.

Also applies to: 193-212

GUIA_RAPIDA_ES.md-7-13 (1)

7-13: Replace bare URLs with Markdown links (markdownlint MD034).
E.g. https://install.wled.me and http://192.168.4.1 should be linked for consistency.

Also applies to: 21-26

ACTUALIZACIONES_COMPONENTES_ES.md-195-203 (1)

195-203: Mark version outputs as examples to avoid “stale-doc” confusion.
The pinned sample outputs (PlatformIO Core, requests version, etc.) should be labeled explicitly as example output so readers don’t treat them as required versions.

Also applies to: 245-250, 279-286

API_REFERENCIA_ES.md-209-224 (1)

209-224: Add a language identifier to the fenced block to satisfy markdownlint (MD040).
Line 213 opens a fence without a language. Suggest text (or properties).

-```
+```text
 ap=SSID_de_wifi         // SSID WiFi
 apw=contraseña          // Contraseña WiFi
 sta=1                   // 1=conectar a WiFi, 0=AP mode
 staticip=192.168.1.100  // IP estática
 gw=192.168.1.1          // Gateway
 sn=255.255.255.0        // Netmask
 dns=8.8.8.8             // DNS
 ltip=MQTT_IP            // IP del broker MQTT
 mquser=usuario          // Usuario MQTT
 mqpass=contraseña       // Contraseña MQTT
COMPILACION_AVANZADA_ES.md-563-573 (1)

563-573: Add a language identifier to the fenced tree block to satisfy markdownlint (MD040).
The wled00/ directory tree is in a bare fence; recommend text.

-```
+```text
 wled00/
 ├── wled.h                    # Configuración principal
 ├── FX.cpp/h                  # Motor de efectos
 ├── palettes.cpp/h            # Paletas de color
 ├── json.cpp                  # Manejo de JSON
 ├── webserver.cpp             # Servidor web
 ├── bus_manager.h             # Gestión de LEDs
 ├── pin_manager.h             # Gestión de GPIO
 └── usermods_list.cpp         # Registro de usermods
DOCUMENTACION_ES.md-975-981 (1)

975-981: Fix language in license sentence (“licensed” → “licenciado” / “con licencia”).
This reads like an accidental English carry-over in an otherwise Spanish doc.

-WLED está licensed bajo EUPL v1.2. Ver [LICENSE](LICENSE) para detalles.
+WLED está licenciado bajo EUPL v1.2. Ver [LICENSE](LICENSE) para detalles.
DOCUMENTACION_ES_INICIO.md-125-131 (1)

125-131: Replace bare URLs with markdown links (MD034).

-- **Wiki Oficial**: https://kno.wled.ge
-- **Discord**: https://discord.gg/QAh7wJHrRM
-- **Foro**: https://wled.discourse.group
-- **GitHub**: https://github.com/wled-dev/WLED
+- **Wiki Oficial**: [kno.wled.ge](https://kno.wled.ge)
+- **Discord**: [discord.gg/QAh7wJHrRM](https://discord.gg/QAh7wJHrRM)
+- **Foro**: [wled.discourse.group](https://wled.discourse.group)
+- **GitHub**: [github.com/wled-dev/WLED](https://github.com/wled-dev/WLED)
🧹 Nitpick comments (29)
pio-scripts/strip-floats.py (1)

8-11: Optional: make flag stripping more resilient to spacing/variants

Current .replace("-u _printf_float", "") / .replace("-u _scanf_float", "") only removes exact substrings; if LINKFLAGS contains variants (different spacing, separate list tokens, etc.) it may not strip them. Consider filtering the env['LINKFLAGS'] list directly (token-based) instead of doing string replace.

pio-scripts/obj-dump.py (1)

8-8: Consider removing the unused platform variable.

Line 8 assigns env.PioPlatform() to platform, but the variable is never used. If not needed for future expansion, consider removing it to eliminate dead code.

 def obj_dump_after_elf(source, target, env):
-    platform = env.PioPlatform()
     board = env.BoardConfig()
pio-scripts/user_config_copy.py (1)

5-9: Optional: make the copy step more resilient / actionable on failure

Right now a missing wled00/my_config_sample.h or permission issue will raise an unhandled exception. If this script is user-facing, consider checking the source exists and printing a clear error (or catching OSError).

pio-scripts/set_metadata.py (2)

69-77: Refine exception handling specificity.

Catching a bare Exception is overly broad and may mask unexpected errors. Replace the generic handler with specific exceptions or at minimum provide clearer context.

    except FileNotFoundError:
        # Git CLI is not installed or not in PATH
        return None
    except subprocess.CalledProcessError:
        # Git command failed (e.g., not a git repo, no remote, etc.)
        return None
-   except Exception:
+   except (OSError, ValueError):
        # Any other unexpected error
        return None

Alternatively, if retaining broad exception handling for stability, add logging to surface unexpected errors for debugging.


59-67: Consider restructuring control flow for clarity.

The early return at line 67 can be moved into an explicit else block following the regex match checks for better code clarity and maintainability.

    # Handle HTTPS URLs
    https_match = re.search(r'github\.com/([^/]+/[^/]+)', remote_url, re.IGNORECASE)
    if https_match:
        return https_match.group(1)
    
    # Handle SSH URLs
    ssh_match = re.search(r'github\.com:([^/]+/[^/]+)', remote_url, re.IGNORECASE)
-   if ssh_match:
+   if ssh_match:
        return ssh_match.group(1)
-   
-   return None
+   else:
+       return None
.github/workflows/nightly.yml (1)

1-2: Remove leading blank line and fix line endings.

YAMLlint reports an extra blank line at the file start and incorrect line ending characters. Apply this normalization:

-
 name: Deploy Nightly

Ensure the file uses Unix-style line endings (\n). Most editors can normalize this automatically.

.github/FUNDING.yml (1)

1-3: Fix line endings and approve funding configuration.

YAMLlint detects incorrect newline character at line 1. Ensure the file uses Unix-style line endings (\n). Content and maintainer/funding links are correct.

package.json (1)

10-33: Consider moving nodemon to devDependencies

Since nodemon is only used by the dev script, keeping it out of runtime dependencies is usually preferable.

 {
   "dependencies": {
     "clean-css": "^5.3.3",
     "html-minifier-terser": "^7.2.0",
-    "web-resource-inliner": "^7.0.0",
-    "nodemon": "^3.1.9"
+    "web-resource-inliner": "^7.0.0"
+  },
+  "devDependencies": {
+    "nodemon": "^3.1.9"
   },
   "engines": {
     "node": ">=20.0.0"
   }
 }
tools/cdata-test.js (1)

19-75: Mixed-language comments in test setup/teardown reduce clarity (and look accidental)

These comments are partially translated (“Crear a temporary archivo”, “eliminar the temporary files”), which makes the intent harder to scan during failures. Either fully translate to Spanish or keep consistent English.

lib/ESP8266PWM/src/core_esp8266_waveform_phase.cpp (3)

57-83: NMI workaround comment: avoid renaming/“translation” of technical terms inside low-level patches.
The patch itself looks unchanged; I’d keep comments around EPC/EPS, vectors, and “return address” in a single consistent technical vocabulary to reduce misinterpretation during future debugging.


186-258: API returns int but uses boolean semantics—consider aligning return type (optional).
startWaveformClockCycles_weak(...) returns int but returns true/false. If the signature is constrained by upstream ABI, fine; otherwise consider bool for clarity.


261-286: Comment says “pin >16 but <32” — consider referencing the actual width/constants (optional).
This is already safe, but the explanation could be clearer by tying to uint32_t bit-shift behavior / supported pin range (0–16).

boards/lilygo-t7-s3.json (1)

1-47: Looks non-functional; consider normalizing indentation (tabs vs spaces) to prevent churn.

There’s a tab-indented entry in extra_flags (Line 10) and minor spacing inconsistencies (Line 3). If the repo has a formatter/style, applying it would help keep future diffs clean.

pio-scripts/build_ui.py (2)

1-21: Ruff F821 on Import/env is expected for SCons; consider excluding these scripts from Ruff (or configuring per-file).

If Ruff runs in CI for this repo, it will keep flagging Import/env even though they’re provided by PlatformIO/SCons. Consider adding a per-file ignore for pio-scripts/*.py (or configuring Ruff accordingly) to avoid perpetual lint noise.


19-21: Optional: fix inconsistent indentation in the exitCode failure path.

Lines 20-21 are indented differently from the rest of the file; aligning indentation reduces maintenance friction.

pio-scripts/output_bins.py (2)

39-57: Optional: mark unused source param to avoid confusion.

If source is part of the PlatformIO post-action signature and intentionally unused, consider renaming to _source (or adding a short comment) to make that explicit.


1-68: Ruff F821 on Import/env is expected for SCons; ensure lint config accounts for these scripts.

Same as pio-scripts/build_ui.py: if Ruff is enforced in CI, configure it to ignore F821 for these PlatformIO scripts (or exclude pio-scripts/).

readme.md (1)

2-9: Add alt text to images for accessibility.

All badge and promotional images are missing alt text, which impacts accessibility for screen reader users. Consider adding descriptive alt text to each image.

For example:

-  <img src="/images/wled_logo_akemi.png">
+  <img src="/images/wled_logo_akemi.png" alt="WLED Logo">
-  <a href="https://github.com/wled-dev/WLED/releases"><img src="https://img.shields.io/github/release/wled-dev/WLED.svg?style=flat-square"></a>
+  <a href="https://github.com/wled-dev/WLED/releases"><img src="https://img.shields.io/github/release/wled-dev/WLED.svg?style=flat-square" alt="GitHub release badge"></a>

Also applies to: 58-58, 72-72, 78-78

tools/translate-all-comments.js (1)

229-229: Consider parameterizing the directory path.

The hardcoded path /workspaces/WLED assumes a specific development environment. Consider accepting the directory as a command-line argument for better portability.

-const files = scanDirectory('/workspaces/WLED');
+const targetDir = process.argv[2] || '/workspaces/WLED';
+const files = scanDirectory(targetDir);
tools/translate-comments.js (1)

224-224: Consider parameterizing the directory path.

The hardcoded path /workspaces/WLED limits portability. Consider accepting it as a command-line argument.

-const files = scanDirectory('/workspaces/WLED');
+const targetDir = process.argv[2] || '/workspaces/WLED';
+const files = scanDirectory(targetDir);
tools/check-translations.js (1)

555-555: Consider parameterizing the directory path.

The hardcoded path /workspaces/WLED limits script portability. Consider accepting it as a command-line argument.

-const files = scanDirectory('/workspaces/WLED');
+const targetDir = process.argv[2] || '/workspaces/WLED';
+const files = scanDirectory(targetDir);
REFERENCIA_RAPIDA_ES.md (1)

77-90: Replace “bold-as-heading” with real headings (markdownlint MD036).
Where sections are introduced with **...**, prefer ### ... headings for consistent structure and TOC friendliness.

Also applies to: 86-98, 187-193, 321-323

RESUMEN_DOCUMENTACION_ES.md (1)

3-16: Stats/counts look brittle; consider “as of ” wording.
Doc/file counts and total line counts will drift quickly; suggest phrasing as “al 10 Dic 2025” (or generating via script in CI) to avoid becoming incorrect.

Also applies to: 127-136

INDICE_DOCUMENTACION_ES.md (1)

95-140: Deep-link anchors across docs are fragile; consider reducing or validating.
Links like DOCUMENTACION_ES.md#... will break if headings change; either keep fewer deep links or add automated link checking in CI for the Spanish doc set.

RESUMEN_DOCUMENTACION_ACTUALIZADO.md (1)

64-75: Optional: align sensor examples across docs (avoid naming sensors not shown).
If BMP280 isn’t actually covered in the linked guides, consider listing only the sensors with concrete sections/examples (or add a BMP280 reference section).

lib/NeoESP32RmtHI/include/NeoEsp32RmtHIMethod.h (1)

72-85: Replace repeated timeout/poll “magic numbers” with named constants.
10000 / portTICK_PERIOD_MS (10s) is repeated; also WaitForTxDone(..., 0) is a special case. Suggest a single shared constant (and ideally pdMS_TO_TICKS(10000) if available) to keep semantics consistent. Based on learnings, prefer meaningful constants over hardcoded literals.

+// Keep timeout semantics consistent across destructor/Update/driver calls.
+static constexpr TickType_t kTxDoneTimeout = (10000 / portTICK_PERIOD_MS);
...
-ESP_ERROR_CHECK_WITHOUT_ABORT(NeoEsp32RmtHiMethodDriver::WaitForTxDone(_channel.RmtChannelNumber, 10000 / portTICK_PERIOD_MS));
+ESP_ERROR_CHECK_WITHOUT_ABORT(NeoEsp32RmtHiMethodDriver::WaitForTxDone(_channel.RmtChannelNumber, kTxDoneTimeout));
...
-if (ESP_OK == ESP_ERROR_CHECK_WITHOUT_ABORT(NeoEsp32RmtHiMethodDriver::WaitForTxDone(_channel.RmtChannelNumber, 10000 / portTICK_PERIOD_MS)))
+if (ESP_OK == ESP_ERROR_CHECK_WITHOUT_ABORT(NeoEsp32RmtHiMethodDriver::WaitForTxDone(_channel.RmtChannelNumber, kTxDoneTimeout)))

Also applies to: 114-135

lib/NeoESP32RmtHI/src/NeoEsp32RmtHI.S (1)

8-16: Formatting-only change looks safe; optional: drop redundant CONFIG_BTDM_CTRL_HLI guarding.
You already gate at Line 8 and again at Line 15; keeping one would reduce confusion.

lib/NeoESP32RmtHI/src/NeoEsp32RmtHIMethod.cpp (2)

487-505: WaitForTxDone polling interval + timeout semantics: centralize constants and document tick units.
The 5 tick sleep and common 10000 / portTICK_PERIOD_MS usage are effectively driver policy; consider named constants to keep behavior consistent and easier to tune. Based on learnings, prefer meaningful constants over hardcoded literals.

+static constexpr TickType_t kTxDonePollIntervalTicks = 5;
...
-    TickType_t sleep = std::min(wait_time, (TickType_t) 5);
+    TickType_t sleep = std::min(wait_time, kTxDonePollIntervalTicks);

362-396: Hardcoded ISR routing values should be constants (and ideally linked to upstream defines).
25, 0xFF000000, and 0xFFFFFFFF are non-obvious; wrapping them in named constants (or referencing an existing SDK define if available) would make this less brittle. Based on learnings, prefer meaningful constants over hardcoded literals.

Comment on lines +106 to +130
```cpp
// Protocolo E1.31
#define WLED_DISABLE_E131

// Servidor MQTT
#define WLED_DISABLE_MQTT

// WebSocket realtime
#define WLED_DISABLE_REALTIME

// Interfaz web (solo JSON API)
#define WLED_DISABLE_WEBUI

// Sync por UDP
#define WLED_DISABLE_UDPNOTIFIER

// Soporte de presets
#define WLED_DISABLE_PRESETS

// Alexa
#define WLED_DISABLE_ALEXA

// Paletas extendidas
#define WLED_DISABLE_PALETTE_EXTENTIONS
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify the exact macro name(s) referenced by the docs
rg -n --fixed-strings "WLED_DISABLE_PALETTE_EXTENTIONS" -S .
echo "---"
rg -n --fixed-strings "WLED_DISABLE_PALETTE_EXTENSIONS" -S .
echo "---"
rg -n --fixed-strings "WLED_DISABLE_PALETTE" -S wled00

Repository: wled/WLED

Length of output: 134


Remove or correct the non-existent flag WLED_DISABLE_PALETTE_EXTENTIONS.

The macro WLED_DISABLE_PALETTE_EXTENTIONS (and the correctly-spelled variant WLED_DISABLE_PALETTE_EXTENSIONS) do not exist in the WLED codebase. Users following this documentation will be unable to disable palette extensions using the suggested flag. Either remove this entry from the documentation or replace it with the actual macro name used in wled00/wled.h for palette-related configuration.

Comment on lines +306 to +362
[esp32s2]
;; generic definitions for all ESP32-S2 boards
platform = ${esp32_idf_V4.platform}
platform_packages = ${esp32_idf_V4.platform_packages}
build_unflags = ${common.build_unflags}
build_flags = -g
-DARDUINO_ARCH_ESP32
-DARDUINO_ARCH_ESP32S2
-DCONFIG_IDF_TARGET_ESP32S2=1
-DARDUINO_USB_MSC_ON_BOOT=0 -DARDUINO_USB_DFU_ON_BOOT=0
-DCO
-DARDUINO_USB_MODE=0 ;; ¡esta bandera es obligatoria para ESP32-S2!
;; por favor asegúrese de que las siguientes banderas estén correctamente definidas (a 0 o 1) en su board.json, o incluidas en su entrada personalizada platformio_override.ini:
;; ARDUINO_USB_CDC_ON_BOOT
${esp32_idf_V4.build_flags}
lib_deps =
${esp32_idf_V4.lib_deps}
board_build.partitions = ${esp32.default_partitions} ;; particionado predeterminado para 4MB Flash - puede ser anulado en los entornos de compilación

[esp32c3]
;; generic definitions for all ESP32-C3 boards
platform = ${esp32_idf_V4.platform}
platform_packages = ${esp32_idf_V4.platform_packages}
build_unflags = ${common.build_unflags}
build_flags = -g
-DARDUINO_ARCH_ESP32
-DARDUINO_ARCH_ESP32C3
-DCONFIG_IDF_TARGET_ESP32C3=1
-DCO
-DARDUINO_USB_MODE=1 ;; esta bandera es obligatoria para ESP32-C3
;; por favor asegúrese de que las siguientes banderas estén correctamente definidas (a 0 o 1) en su board.json, o incluidas en su entrada personalizada platformio_override.ini:
;; ARDUINO_USB_CDC_ON_BOOT
${esp32_idf_V4.build_flags}
lib_deps =
${esp32_idf_V4.lib_deps}
board_build.partitions = ${esp32.default_partitions} ;; particionado predeterminado para 4MB Flash - puede ser anulado en los entornos de compilación
board_build.flash_mode = qio

[esp32s3]
;; generic definitions for all ESP32-S3 boards
platform = ${esp32_idf_V4.platform}
platform_packages = ${esp32_idf_V4.platform_packages}
build_unflags = ${common.build_unflags}
build_flags = -g
-DESP32
-DARDUINO_ARCH_ESP32
-DARDUINO_ARCH_ESP32S3
-DCONFIG_IDF_TARGET_ESP32S3=1
-DARDUINO_USB_MSC_ON_BOOT=0 -DARDUINO_DFU_ON_BOOT=0
-DCO
;; por favor asegúrese de que las siguientes banderas estén correctamente definidas (a 0 o 1) en su board.json, o incluidas en su entrada personalizada platformio_override.ini:
;; ARDUINO_USB_MODE, ARDUINO_USB_CDC_ON_BOOT
${esp32_idf_V4.build_flags}
lib_deps =
${esp32_idf_V4.lib_deps}
board_build.partitions = ${esp32.large_partitions} ;; particionado predeterminado para 8MB Flash - puede ser anulado en los entornos de compilación

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

# Find all occurrences of -DCO in platformio.ini with context
rg -n '\-DCO' platformio.ini -B 2 -A 2

Repository: wled/WLED

Length of output: 1252


🏁 Script executed:

# Search for CO macro/define usage in the codebase (excluding platformio.ini)
rg -i 'ifdef\s+CO\b|defined\(CO\)|#define\s+CO\b' --type c --type cpp --type h

Repository: wled/WLED

Length of output: 35


🏁 Script executed:

# Check if CO is referenced in any source files
rg '\bCO\b' --type c --type cpp --type h -c | head -20

Repository: wled/WLED

Length of output: 151


🏁 Script executed:

# Look for any comments or documentation about -DCO flag
rg -i 'DCO|CO\s*(flag|define|compiler)' platformio.ini

Repository: wled/WLED

Length of output: 174


🏁 Script executed:

# Check the 5 files that had CO matches to see context
for file in wled00/xml.cpp wled00/set.cpp wled00/cfg.cpp wled00/bus_manager.h wled00/bus_manager.cpp; do
  echo "=== $file ==="
  rg -n '\bCO\b' "$file" -B 2 -A 2 | head -20
done

Repository: wled/WLED

Length of output: 1904


🏁 Script executed:

# Search for any #if/#ifdef directives that might check for CO
rg '#if\s*defined.*CO|#ifdef.*CO|#if.*CO' --type c --type cpp --type h

Repository: wled/WLED

Length of output: 14891


🏁 Script executed:

# Check git log for when -DCO was added to platformio.ini
git log -p --all -- platformio.ini | grep -B 5 -A 5 '\-DCO' | head -40

Repository: wled/WLED

Length of output: 35


🏁 Script executed:

# Search more broadly - maybe CO is part of a larger pattern
rg 'CO' platformio.ini -B 1 -A 1

Repository: wled/WLED

Length of output: 1409


🏁 Script executed:

# Final check: search for any git history on these specific lines
git log --oneline -S "-DCO" -- platformio.ini | head -5

Repository: wled/WLED

Length of output: 79


🏁 Script executed:

# Check if CO is used as a preprocessor token anywhere
rg -i '#if\s+CO\b|#define\s+CO\b'

Repository: wled/WLED

Length of output: 35


Remove the -DCO stray build flag from ESP32 variant configurations.

The -DCO flag appears in the build_flags for [esp32s2] (line 316), [esp32c3] (line 334), and [esp32s3] (line 355) but is never checked or used anywhere in the codebase via #ifdef CO or #if defined(CO). All references to "CO" in source files are local variable names or debug output labels, not preprocessor directives. This flag provides no functionality and should be removed.

🤖 Prompt for AI Agents
In platformio.ini around lines 306 to 362 (esp32s2: ~316, esp32c3: ~334,
esp32s3: ~355), remove the stray -DCO entry from each build_flags block;
specifically delete the lone "-DCO" token in the build_flags for [esp32s2],
[esp32c3], and [esp32s3], and scan for any other accidental -DCO occurrences and
remove them so no unused preprocessor macro is injected during builds.

Comment on lines +241 to +251
// Don't run this script if we're in a test environment
if (process.env.NODE_ENV === 'test') {
return;
}

console.info(wledBanner);

if (isAlreadyBuilt("wled00/data") && process.argv[2] !== '--force' && process.argv[2] !== '-f') {
console.info("Web UI is already built");
return;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Blocker: remove top-level return (script is currently a syntax error)

return; at top-level is invalid in Node/CommonJS (matches Biome parse errors). Recommend wrapping the executable portion in main() and gating on require.main === module:

-// Don't run this script if we're in a test environment
-if (process.env.NODE_ENV === 'test') {
-  return;
-}
-
-console.info(wledBanner);
-
-if (isAlreadyBuilt("wled00/data") && process.argv[2] !== '--force' && process.argv[2] !== '-f') {
-  console.info("Web UI is already built");
-  return;
-}
-
-writeHtmlGzipped("wled00/data/index.htm", "wled00/html_ui.h", 'index');
+async function main() {
+  console.info(wledBanner);
+
+  if (isAlreadyBuilt("wled00/data") && process.argv[2] !== "--force" && process.argv[2] !== "-f") {
+    console.info("Web UI is already built");
+    return;
+  }
+
+  writeHtmlGzipped("wled00/data/index.htm", "wled00/html_ui.h", "index");
   writeHtmlGzipped("wled00/data/pixart/pixart.htm", "wled00/html_pixart.h", 'pixart');
   //writeHtmlGzipped("wled00/datos/cpal/cpal.htm", "wled00/html_cpal.h", 'cpal');
   writeHtmlGzipped("wled00/data/pxmagic/pxmagic.htm", "wled00/html_pxmagic.h", 'pxmagic');
   //writeHtmlGzipped("wled00/datos/edit.htm", "wled00/html_edit.h", 'edit');
 
+  writeChunks(
+    "wled00/data",
+    [
+      {
+        file: "edit.htm",
+        name: "PAGE_edit",
+        method: "gzip",
+        filter: "html-minify"
+      }
+    ],
+    "wled00/html_edit.h"
+  );
+
+  writeChunks(
+    "wled00/data/cpal",
+    [
+      {
+        file: "cpal.htm",
+        name: "PAGE_cpal",
+        method: "gzip",
+        filter: "html-minify"
+      }
+    ],
+    "wled00/html_cpal.h"
+  );
+
+  writeChunks(
+    "wled00/data",
+    [
+      {
+        file: "style.css",
+        name: "PAGE_settingsCss",
+        method: "gzip",
+        filter: "css-minify",
+        mangle: (str) =>
+          str
+            .replace("%%", "%")
+      },
+      {
+        file: "common.js",
+        name: "JS_common",
+        method: "gzip",
+        filter: "js-minify",
+      },
+      {
+        file: "settings.htm",
+        name: "PAGE_settings",
+        method: "gzip",
+        filter: "html-minify",
+      },
+      {
+        file: "settings_wifi.htm",
+        name: "PAGE_settings_wifi",
+        method: "gzip",
+        filter: "html-minify",
+      },
+      {
+        file: "settings_leds.htm",
+        name: "PAGE_settings_leds",
+        method: "gzip",
+        filter: "html-minify",
+      },
+      {
+        file: "settings_dmx.htm",
+        name: "PAGE_settings_dmx",
+        method: "gzip",
+        filter: "html-minify",
+      },
+      {
+        file: "settings_ui.htm",
+        name: "PAGE_settings_ui",
+        method: "gzip",
+        filter: "html-minify",
+      },
+      {
+        file: "settings_sync.htm",
+        name: "PAGE_settings_sync",
+        method: "gzip",
+        filter: "html-minify",
+      },
+      {
+        file: "settings_time.htm",
+        name: "PAGE_settings_time",
+        method: "gzip",
+        filter: "html-minify",
+      },
+      {
+        file: "settings_sec.htm",
+        name: "PAGE_settings_sec",
+        method: "gzip",
+        filter: "html-minify",
+      },
+      {
+        file: "settings_um.htm",
+        name: "PAGE_settings_um",
+        method: "gzip",
+        filter: "html-minify",
+      },
+      {
+        file: "settings_2D.htm",
+        name: "PAGE_settings_2D",
+        method: "gzip",
+        filter: "html-minify",
+      },
+      {
+        file: "settings_pin.htm",
+        name: "PAGE_settings_pin",
+        method: "gzip",
+        filter: "html-minify"
+      }
+    ],
+    "wled00/html_settings.h"
+  );
+
+  writeChunks(
+    "wled00/data",
+    [
+      {
+        file: "usermod.htm",
+        name: "PAGE_usermod",
+        method: "gzip",
+        filter: "html-minify",
+        mangle: (str) =>
+          str.replace(/fetch\("http\:\/\/.*\/win/gms, 'fetch("/win'),
+      },
+      {
+        file: "msg.htm",
+        name: "PAGE_msg",
+        prepend: "=====(",
+        append: ")=====",
+        method: "plaintext",
+        filter: "html-minify",
+        mangle: (str) => str.replace(/\<h2\>.*\<\/body\>/gms, "<h2>%MSG%</body>"),
+      },
+      {
+        file: "dmxmap.htm",
+        name: "PAGE_dmxmap",
+        prepend: "=====(",
+        append: ")=====",
+        method: "plaintext",
+        filter: "html-minify",
+        mangle: (str) => `
+#ifdef WLED_ENABLE_DMX
+${str.replace(/function FM\(\)[ ]?\{/gms, "function FM() {%DMXVARS%\n")}
+#else
+const char PAGE_dmxmap[] PROGMEM = R"=====()=====";
+#endif
+`,
+      },
+      {
+        file: "update.htm",
+        name: "PAGE_update",
+        method: "gzip",
+        filter: "html-minify",
+      },
+      {
+        file: "welcome.htm",
+        name: "PAGE_welcome",
+        method: "gzip",
+        filter: "html-minify",
+      },
+      {
+        file: "liveview.htm",
+        name: "PAGE_liveview",
+        method: "gzip",
+        filter: "html-minify",
+      },
+      {
+        file: "liveviewws2D.htm",
+        name: "PAGE_liveviewws2D",
+        method: "gzip",
+        filter: "html-minify",
+      },
+      {
+        file: "404.htm",
+        name: "PAGE_404",
+        method: "gzip",
+        filter: "html-minify",
+      },
+      {
+        file: "favicon.ico",
+        name: "favicon",
+        method: "binary",
+      }
+    ],
+    "wled00/html_other.h"
+  );
+}
+
+if (require.main === module && process.env.NODE_ENV !== "test") {
+  void main();
+}

Also applies to: 246-446

🧰 Tools
🪛 Biome (2.1.2)

[error] 243-245: Illegal return statement outside of a function

(parse)

🤖 Prompt for AI Agents
In tools/cdata.js around lines 241 to 251 (and similarly for the rest of the
executable block at 246-446), remove the invalid top-level `return;` statements
and instead wrap the script’s executable logic in an async `main()` function;
replace the current top-level checks with an early-exit inside `main()` or guard
invocation by checking `if (require.main === module) { main().catch(err => {
console.error(err); process.exit(1); }); }` so the file can be required as a
module without causing a syntax error and the script behavior (NODE_ENV test
guard, banner print, build checks, and force flags) remains the same.

Comment on lines +500 to +503
// Comentarios de bloque /* */
content = content.replace(/\/\*([\s\S]*?)\*\//g, (match) => {
return '/*' + translateComment(coincidir.slice(2, -2)) + '*/';
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Fix undefined variable reference causing runtime error.

Line 502 references coincidir which is undefined. This should be match, the parameter from the regex callback. This will cause a ReferenceError when processing block comments.

Apply this diff:

     // Comentarios de bloque /* */
     content = content.replace(/\/\*([\s\S]*?)\*\//g, (match) => {
-      return '/*' + translateComment(coincidir.slice(2, -2)) + '*/';
+      return '/*' + translateComment(match.slice(2, -2)) + '*/';
     });
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// Comentarios de bloque /* */
content = content.replace(/\/\*([\s\S]*?)\*\//g, (match) => {
return '/*' + translateComment(coincidir.slice(2, -2)) + '*/';
});
// Comentarios de bloque /* */
content = content.replace(/\/\*([\s\S]*?)\*\//g, (match) => {
return '/*' + translateComment(match.slice(2, -2)) + '*/';
});
🤖 Prompt for AI Agents
In tools/check-translations.js around lines 500 to 503, the regex callback for
replacing block comments uses an undefined variable `coincidir`; change that to
the callback parameter `match` and use match.slice(2, -2) when calling
translateComment so the correct substring of the matched comment is passed; keep
returning the reconstructed comment string using '/*' +
translateComment(match.slice(2, -2)) + '*/'.

Comment on lines +510 to +513
// Comentarios HTML <!-- -->
content = content.replace(/<!--([\s\S]*?)-->/g, (match) => {
return '<!--' + translateComment(coincidir.slice(4, -3)) + '-->';
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Fix undefined variable reference causing runtime error.

Line 512 references coincidir which is undefined. This should be match. This will cause a ReferenceError when processing HTML comments.

Apply this diff:

     // Comentarios HTML <!-- -->
     content = content.replace(/<!--([\s\S]*?)-->/g, (match) => {
-      return '<!--' + translateComment(coincidir.slice(4, -3)) + '-->';
+      return '<!--' + translateComment(match.slice(4, -3)) + '-->';
     });
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// Comentarios HTML <!-- -->
content = content.replace(/<!--([\s\S]*?)-->/g, (match) => {
return '<!--' + translateComment(coincidir.slice(4, -3)) + '-->';
});
// Comentarios HTML <!-- -->
content = content.replace(/<!--([\s\S]*?)-->/g, (match) => {
return '<!--' + translateComment(match.slice(4, -3)) + '-->';
});
🤖 Prompt for AI Agents
In tools/check-translations.js around lines 510 to 513, the replace callback
references an undefined variable `coincidir` causing a ReferenceError; change
that reference to the callback's `match` parameter and keep the existing slice
indices (match.slice(4, -3)) so the comment text is extracted correctly, then
return '<!--' + translateComment(match.slice(4, -3)) + '-->' from the callback.

@erpepe2004 erpepe2004 closed this Dec 12, 2025
@erpepe2004 erpepe2004 deleted the feature/sinricpro branch December 12, 2025 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant