From 3e9fd4dbe08440040384d7c1c1c74c04d20b607d Mon Sep 17 00:00:00 2001 From: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> Date: Mon, 14 Apr 2025 13:46:27 -0300 Subject: [PATCH 1/3] ci(pre-commit): Execute codespell after formatting changes --- .pre-commit-config.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f80261422b0..2a2d5fdcf44 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -39,13 +39,6 @@ repos: ^package\/.*$ ) - - repo: https://github.com/codespell-project/codespell - rev: "v2.3.0" - hooks: - # Spell checking - - id: codespell - exclude: ^.*\.(svd|SVD)$ - - repo: https://github.com/pre-commit/mirrors-clang-format rev: "v18.1.3" hooks: @@ -80,6 +73,13 @@ repos: - id: prettier types_or: [yaml] + - repo: https://github.com/codespell-project/codespell + rev: "v2.3.0" + hooks: + # Spell checking + - id: codespell + exclude: ^.*\.(svd|SVD)$ + - repo: https://github.com/shellcheck-py/shellcheck-py rev: "v0.10.0.1" hooks: From 01b8f6f4fd0fe06b7d912272662741ffcd7aa70f Mon Sep 17 00:00:00 2001 From: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> Date: Mon, 14 Apr 2025 14:07:37 -0300 Subject: [PATCH 2/3] ci(pre-commit): Lock versions to hash --- .pre-commit-config.yaml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2a2d5fdcf44..0d425c46eae 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,7 +12,7 @@ default_language_version: repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: "v5.0.0" + rev: "cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b" # v5.0.0 hooks: # Generic checks - id: check-case-conflict @@ -40,7 +40,7 @@ repos: ) - repo: https://github.com/pre-commit/mirrors-clang-format - rev: "v18.1.3" + rev: "f6446549e5e97ec9665b9b03e75b87b445857f9a" # v18.1.3 hooks: # C/C++ formatting - id: clang-format @@ -48,7 +48,7 @@ repos: exclude: ^.*\/build_opt\.h$ - repo: https://github.com/psf/black-pre-commit-mirror - rev: "24.10.0" + rev: "a4920527036bb9a3f3e6055d595849d67d0da066" # 25.1.0 hooks: # Python formatting - id: black @@ -56,7 +56,7 @@ repos: args: [--line-length=120] #From the arduino code style. Add as argument rather than creating a new config file. - repo: https://github.com/PyCQA/flake8 - rev: "7.1.1" + rev: "16f5f28a384f0781bebb37a08aa45e65b9526c50" # 7.2.0 hooks: # Python linting - id: flake8 @@ -67,28 +67,28 @@ repos: - flake8-simplify - repo: https://github.com/pre-commit/mirrors-prettier - rev: "v3.1.0" + rev: "ffb6a759a979008c0e6dff86e39f4745a2d9eac4" # v3.1.0 hooks: # YAML formatting - id: prettier types_or: [yaml] - repo: https://github.com/codespell-project/codespell - rev: "v2.3.0" + rev: "63c8f8312b7559622c0d82815639671ae42132ac" # v2.4.1 hooks: # Spell checking - id: codespell exclude: ^.*\.(svd|SVD)$ - repo: https://github.com/shellcheck-py/shellcheck-py - rev: "v0.10.0.1" + rev: "a23f6b85d0fdd5bb9d564e2579e678033debbdff" # v0.10.0.1 hooks: # Bash linting - id: shellcheck types: [shell] - repo: https://github.com/openstack/bashate - rev: "2.1.1" + rev: "fbd7c2534c2701351c603ff700ddf08202430a31" # 2.1.1 hooks: # Bash formatting - id: bashate @@ -96,15 +96,15 @@ repos: args: ["-i", "E006"] # Ignore E006: Line too long - repo: https://github.com/errata-ai/vale - rev: "v3.9.1" + rev: "dc4c47923788a413fb5677de6e3370d514aecb78" # v3.11.2 hooks: # Sync vale styles and lint markdown and reStructuredText - id: vale name: vale-sync - language_version: "1.21.6" + language_version: "1.23.2" pass_filenames: false args: [sync] types_or: [markdown, rst] - id: vale - language_version: "1.21.6" + language_version: "1.23.2" types_or: [markdown, rst] From 5981b0a02f32af7804856ada988cdbe615bf090d Mon Sep 17 00:00:00 2001 From: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> Date: Mon, 14 Apr 2025 14:13:07 -0300 Subject: [PATCH 3/3] fix(pre-commit): Apply pre-commit fixes --- .codespellrc | 2 +- libraries/USB/src/keyboardLayout/KeyboardLayout.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.codespellrc b/.codespellrc index 756f7e9503b..d3b9b45cb1e 100644 --- a/.codespellrc +++ b/.codespellrc @@ -1,7 +1,7 @@ [codespell] # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/spell-check/.codespellrc # In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here: -ignore-words-list = ba,licence,ot,dout,als,exten +ignore-words-list = ba,licence,ot,dout,als,exten,emac skip = ./.git,./.licenses,__pycache__,.clang-format,.codespellrc,.editorconfig,.flake8,.prettierignore,.yamllint.yml,.gitignore,boards.txt,platform.txt,programmers.txt builtin = clear,informal,en-GB_to_en-US check-filenames = diff --git a/libraries/USB/src/keyboardLayout/KeyboardLayout.h b/libraries/USB/src/keyboardLayout/KeyboardLayout.h index 0ef69dc7ab9..ee6b6b4e11e 100644 --- a/libraries/USB/src/keyboardLayout/KeyboardLayout.h +++ b/libraries/USB/src/keyboardLayout/KeyboardLayout.h @@ -5,7 +5,7 @@ only in Keyboard.cpp and the keyboard layout files. Layout files map ASCII character codes to keyboard scan codes (technically, to USB HID Usage codes), possibly altered by the SHIFT or ALT_GR modifiers. - Non-ACSII characters (anything outside the 7-bit range NUL..DEL) are + Non-ASCII characters (anything outside the 7-bit range NUL..DEL) are not supported. == Creating your own layout ==