From d1bf65b64f89e9fb9ec7775a43d9c4d53ef6445d Mon Sep 17 00:00:00 2001 From: Shen Mengjing Date: Tue, 23 Sep 2025 16:11:22 +0800 Subject: [PATCH] feat: Add codespell to pre-commit --- .codespellrc | 4 ++++ .github/workflows/pre-commit.yml | 2 +- .pre-commit-config.yaml | 8 +++++++- CHANGELOG.md | 6 +++--- docs_espressif/en/additionalfeatures/esp-idf-profiles.rst | 2 +- docs_espressif/en/additionalfeatures/qemu.rst | 2 +- docs_espressif/en/additionalfeatures/web-extension.rst | 8 ++++---- docs_espressif/en/debugproject.rst | 4 ++-- docs_espressif/zh_CN/additionalfeatures/web-extension.rst | 6 +++--- walkthroughs/advanced/component-installation.md | 2 +- 10 files changed, 27 insertions(+), 17 deletions(-) create mode 100644 .codespellrc diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 000000000..8e761c3d9 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,4 @@ +[codespell] +skip = _build +ignore-words-list = ser,dout,rsource,fram,inout,shs,ans,aci,unstall,unstalling,hart,wheight,ot,wel,parms,ehen,pre-empt,EMAC +write-changes = false diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index c5ff0aa57..50839e3cb 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -21,4 +21,4 @@ jobs: run: pip install pre-commit - name: Run pre-commit hook - run: pre-commit run --all-files \ No newline at end of file + run: pre-commit run \ No newline at end of file diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3e925ad63..dc14901b0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,4 +9,10 @@ rev: v1.2.1 hooks: - id: conventional-precommit-linter - stages: [commit-msg] \ No newline at end of file + stages: [commit-msg] + - repo: https://github.com/codespell-project/codespell + rev: v2.4.1 + hooks: + - id: codespell + files: ^.*\.(py|c|h|md|rst|yml)$ + stages: [pre-commit] diff --git a/CHANGELOG.md b/CHANGELOG.md index ee1de8dcd..787e35c81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -516,7 +516,7 @@ All notable changes to the "Espressif IDF" extension will be documented in this - [Send Ctrl + \] signal to exit idf monitor on flash tasks](https://github.com/espressif/vscode-esp-idf-extension/pull/382) - [Fix New project wizard require serial ports, add esp32s3 esp32c3, release vsix without extension dependencies](https://github.com/espressif/vscode-esp-idf-extension/pull/378) -- [Check arduino component directory exists, remove old arduino-esp32 cloning branches](hhttps://github.com/espressif/vscode-esp-idf-extension/pull/370) +- [Check arduino component directory exists, remove old arduino-esp32 cloning branches](https://github.com/espressif/vscode-esp-idf-extension/pull/370) - [Remove IDF Tools exact match on extension activation](https://github.com/espressif/vscode-esp-idf-extension/pull/359) - [Fix device configuration target setting](https://github.com/espressif/vscode-esp-idf-extension/pull/384) @@ -669,13 +669,13 @@ All notable changes to the "Espressif IDF" extension will be documented in this - SEO for vscode marketplace, add keywords and update description - Enhance and Fix some bugs with IDF Monitor terminal - Update Stale CI configs -- Project structore enhancement, remove unused files in project +- Project structure enhancement, remove unused files in project - Fix xtensa toolchain issue and getProjectName - Update OpenOCD script checks ## [0.2.0](https://github.com/espressif/vscode-esp-idf-extension/releases/tag/v0.2.0) -### Release Debug Adapter for ESP-IDF withing VSCode +### Release Debug Adapter for ESP-IDF within VSCode - Release Debug Adapter, this would enable debugging for an IDF project from within the VSCode IDE, please refer the guide for how to use the same - Add support for save before IDF build, this would save all your edited files and then trigger a build. diff --git a/docs_espressif/en/additionalfeatures/esp-idf-profiles.rst b/docs_espressif/en/additionalfeatures/esp-idf-profiles.rst index 9ae98c8fe..6f51f9007 100644 --- a/docs_espressif/en/additionalfeatures/esp-idf-profiles.rst +++ b/docs_espressif/en/additionalfeatures/esp-idf-profiles.rst @@ -40,7 +40,7 @@ How to Import an ESP-IDF Profile * **Default Profile (`ESP-IDF`)**: (Uses Microsoft C/C++ Tools) * `Default Profile GitHub Repository `_ - * `Defualt Profile Direct Download Link `_ + * `Default Profile Direct Download Link `_ * **Clangd Profile (`ESP-IDF (clangd)`)**: (Uses clangd) * `Clangd Profile GitHub Repository `_ diff --git a/docs_espressif/en/additionalfeatures/qemu.rst b/docs_espressif/en/additionalfeatures/qemu.rst index 022ce48fb..5ab7b06d4 100644 --- a/docs_espressif/en/additionalfeatures/qemu.rst +++ b/docs_espressif/en/additionalfeatures/qemu.rst @@ -21,7 +21,7 @@ Development steps: 5. Write your code and build the project with the **ESP-IDF: Build your Project** command. 6. Use the **ESP-IDF: Launch QEMU Server** command or the **[QEMU Server]** link in the activity bar to launch QEMU with the binaries from the build directory. 7. You can use the **ESP-IDF: Monitor QEMU Device** command to launch a terminal running IDF Monitor on QEMU. -8. If you want to launch a QEMU debug session, use the **ESP-IDF: Launch QEMU Debug Session** commmand, which will stop any existing QEMU server and launch a new QEMU server for debugging. +8. If you want to launch a QEMU debug session, use the **ESP-IDF: Launch QEMU Debug Session** command, which will stop any existing QEMU server and launch a new QEMU server for debugging. You can use the ``idf.qemuDebugMonitor`` configuration setting to enable the monitor to start after QEMU debug session is launched. If you want to pass additional arguments ``idf.qemuExtraArgs`` configuration setting can be used. diff --git a/docs_espressif/en/additionalfeatures/web-extension.rst b/docs_espressif/en/additionalfeatures/web-extension.rst index 2c25e065a..0b27b4de9 100644 --- a/docs_espressif/en/additionalfeatures/web-extension.rst +++ b/docs_espressif/en/additionalfeatures/web-extension.rst @@ -71,11 +71,11 @@ ESP-IDF-Web Commands Press menu **View**, select **Command Palette...** and search for these commands: -``ESP-IDF-Web Flash``: Flash binaries from selected workspace to selected serial port. If no serial port was previously selected, it will ask the user for the serial port to use othewise use previously selected serial port. +``ESP-IDF-Web Flash``: Flash binaries from selected workspace to selected serial port. If no serial port was previously selected, it will ask the user for the serial port to use otherwise use previously selected serial port. -``ESP-IDF-Web Monitor``: Start a serial monitor terminal connected to the selected serial port. If no serial port was previously selected, it will ask the user for the serial port to use othewise use previously selected serial port. +``ESP-IDF-Web Monitor``: Start a serial monitor terminal connected to the selected serial port. If no serial port was previously selected, it will ask the user for the serial port to use otherwise use previously selected serial port. -``ESP-IDF-Web Flash and Monitor``: Flash binaries from selected workspace folder to selected serial port and start a serial monitor terminal to selected serial port. If no serial port was previously selected, it will ask the user for the serial port to use othewise use previously selected serial port. +``ESP-IDF-Web Flash and Monitor``: Flash binaries from selected workspace folder to selected serial port and start a serial monitor terminal to selected serial port. If no serial port was previously selected, it will ask the user for the serial port to use otherwise use previously selected serial port. ``ESP-IDF-Web Select serial port``: Show the list of available serial ports for previous commands. The selected serial port will saved and shown in the status bar icon and re used by this extension commands. @@ -92,4 +92,4 @@ ESP-IDF-Web Settings ``idfWeb.enableStatusBarIcons``: Show or hide the ESP-IDF Web extension status bar icons: (Selected serial port, Flash and Monitor icons). This setting can only be modified in User Settings. -For ``ESP-IDF-Web Monitor`` command, the baud rate used is determined from build directory's ``project_description.json`` field called ``monitor_baud``. \ No newline at end of file +For ``ESP-IDF-Web Monitor`` command, the baud rate used is determined from build directory's ``project_description.json`` field called ``monitor_baud``. diff --git a/docs_espressif/en/debugproject.rst b/docs_espressif/en/debugproject.rst index 6fdfc57ae..f41ff2a3c 100644 --- a/docs_espressif/en/debugproject.rst +++ b/docs_espressif/en/debugproject.rst @@ -136,7 +136,7 @@ You can modify the configuration to suit your needs. Let's describe the configur - ``type``: The type of the debug configuration. It should be set to ``gdbtarget``. - ``program``: ELF file of your project build directory to execute the debug session. You can use the command ``${command:espIdf.getProjectName}`` to query the extension to find the current build directory project name. - ``initCommands``: GDB Commands to initialize GDB and target. The default value is ``["set remote hardware-watchpoint-limit IDF_TARGET_CPU_WATCHPOINT_NUM", "mon reset halt", "maintenance flush register-cache"]``. -- ``initialBreakpoint``: When ``initCommands`` is not defined, this command will add to default ``initCommands`` a hardward breakpoint at the given function name. For example app_main, the default value, will add ``thb app_main`` to default initCommmands. If set to "", an empty string, no initial breakpoint will be set and if let undefined it will use the default thb app_main. +- ``initialBreakpoint``: When ``initCommands`` is not defined, this command will add to default ``initCommands`` a hardware breakpoint at the given function name. For example app_main, the default value, will add ``thb app_main`` to default initCommmands. If set to "", an empty string, no initial breakpoint will be set and if let undefined it will use the default thb app_main. - ``gdb``: GDB executable to be used. By default "${command:espIdf.getToolchainGdb}" will query the extension to find the ESP-IDF toolchain GDB for the current IDF_TARGET of your esp-idf project (esp32, esp32c6, etc.). .. note:: @@ -337,7 +337,7 @@ ESP-IDF extension provides an ``ESP-IDF: Peripheral View`` tree in the ``Run and Post-mortem Debugging Use Cases ------------------------------- -You can start a monitor session to capture fatal error events with **ESP-IDF: Launch IDF Monitor for Core Dump Mode/GDB Stub Modec** command. If configured in your project's sdkconfig, it can trigger the start of a debug session for GDB remote protocol server (GDBStub) or `ESP-IDF Core Dump `_ when an error occurrs. For more information, see `Panic Handler `_. +You can start a monitor session to capture fatal error events with **ESP-IDF: Launch IDF Monitor for Core Dump Mode/GDB Stub Modec** command. If configured in your project's sdkconfig, it can trigger the start of a debug session for GDB remote protocol server (GDBStub) or `ESP-IDF Core Dump `_ when an error occurs. For more information, see `Panic Handler `_. - **Core Dump** is configured when **Core Dump's Data Destination** is set to either ``UART`` or ``FLASH`` using the ``ESP-IDF: SDK Configuration Editor`` extension command or ``idf.py menuconfig`` in a terminal. - **GDB Stub** is configured when **Panic Handler Behaviour** is set to ``Invoke GDBStub`` using the ``ESP-IDF: SDK Configuration Editor`` extension command or ``idf.py menuconfig`` in a terminal. diff --git a/docs_espressif/zh_CN/additionalfeatures/web-extension.rst b/docs_espressif/zh_CN/additionalfeatures/web-extension.rst index 2c25e065a..0e3002bdf 100644 --- a/docs_espressif/zh_CN/additionalfeatures/web-extension.rst +++ b/docs_espressif/zh_CN/additionalfeatures/web-extension.rst @@ -71,11 +71,11 @@ ESP-IDF-Web Commands Press menu **View**, select **Command Palette...** and search for these commands: -``ESP-IDF-Web Flash``: Flash binaries from selected workspace to selected serial port. If no serial port was previously selected, it will ask the user for the serial port to use othewise use previously selected serial port. +``ESP-IDF-Web Flash``: Flash binaries from selected workspace to selected serial port. If no serial port was previously selected, it will ask the user for the serial port to use otherwise use previously selected serial port. -``ESP-IDF-Web Monitor``: Start a serial monitor terminal connected to the selected serial port. If no serial port was previously selected, it will ask the user for the serial port to use othewise use previously selected serial port. +``ESP-IDF-Web Monitor``: Start a serial monitor terminal connected to the selected serial port. If no serial port was previously selected, it will ask the user for the serial port to use otherwise use previously selected serial port. -``ESP-IDF-Web Flash and Monitor``: Flash binaries from selected workspace folder to selected serial port and start a serial monitor terminal to selected serial port. If no serial port was previously selected, it will ask the user for the serial port to use othewise use previously selected serial port. +``ESP-IDF-Web Flash and Monitor``: Flash binaries from selected workspace folder to selected serial port and start a serial monitor terminal to selected serial port. If no serial port was previously selected, it will ask the user for the serial port to use otherwise use previously selected serial port. ``ESP-IDF-Web Select serial port``: Show the list of available serial ports for previous commands. The selected serial port will saved and shown in the status bar icon and re used by this extension commands. diff --git a/walkthroughs/advanced/component-installation.md b/walkthroughs/advanced/component-installation.md index 1d26481de..3896c867a 100644 --- a/walkthroughs/advanced/component-installation.md +++ b/walkthroughs/advanced/component-installation.md @@ -9,4 +9,4 @@ ![GIF for Using Component Example](../../media/walkthrough/gifs/create-example-from-component.gif) ## Related Resources -- [Install ESP-IDF Components Documnetation](https://docs.espressif.com/projects/vscode-esp-idf-extension/en/latest/additionalfeatures/install-esp-components.html) \ No newline at end of file +- [Install ESP-IDF Components Documentation](https://docs.espressif.com/projects/vscode-esp-idf-extension/en/latest/additionalfeatures/install-esp-components.html) \ No newline at end of file