From cebe56541a62c913b0d75d124addc31fffe31393 Mon Sep 17 00:00:00 2001 From: HendrikRauh <114620133+HendrikRauh@users.noreply.github.com> Date: Mon, 16 Mar 2026 21:59:46 +0100 Subject: [PATCH 1/3] feat(pre-commit): add cmake-format and cmake-lint hooks --- .pre-commit-config.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3048387..24c3359 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -98,3 +98,8 @@ repos: entry: nixfmt language: system types: [nix] + - repo: https://github.com/cheshirekow/cmake-format-precommit + rev: v0.6.10 + hooks: + - id: cmake-format + - id: cmake-lint From bab5725e921ec25dbfec5e48fdace7339aa9eb68 Mon Sep 17 00:00:00 2001 From: HendrikRauh <114620133+HendrikRauh@users.noreply.github.com> Date: Mon, 16 Mar 2026 21:59:55 +0100 Subject: [PATCH 2/3] style(CMake): reformat CMakeLists.txt for improved readability --- CMakeLists.txt | 10 ++++------ components/storage/CMakeLists.txt | 14 +++++++++----- components/web_server/CMakeLists.txt | 21 +++++++++++++++------ main/CMakeLists.txt | 5 ++--- 4 files changed, 30 insertions(+), 20 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ec000b..d632be3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,10 +1,7 @@ -# For more information about build system see -# https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html -# The following five lines of boilerplate have to be in your project's -# CMakeLists in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) -# Clear any stale EXTRA_COMPONENT_DIRS entries (e.g. leftover from previous runs or PlatformIO) +# Clear any stale EXTRA_COMPONENT_DIRS entries (e.g. leftover from previous runs +# or PlatformIO) set(EXTRA_COMPONENT_DIRS "") include($ENV{IDF_PATH}/tools/cmake/project.cmake) @@ -13,5 +10,6 @@ project(dmx-interface) # Enable LittleFS filesystem image creation for web assets if(COMMAND littlefs_create_partition_image) - littlefs_create_partition_image(storage ${CMAKE_SOURCE_DIR}/data FLASH_IN_PROJECT) + littlefs_create_partition_image(storage ${CMAKE_SOURCE_DIR}/data + FLASH_IN_PROJECT) endif() diff --git a/components/storage/CMakeLists.txt b/components/storage/CMakeLists.txt index 2cb9d94..03f4b47 100644 --- a/components/storage/CMakeLists.txt +++ b/components/storage/CMakeLists.txt @@ -1,6 +1,10 @@ idf_component_register( - SRCS "src/storage.c" - INCLUDE_DIRS "include" - REQUIRES joltwallet__littlefs - PRIV_REQUIRES vfs logger -) + SRCS + "src/storage.c" + INCLUDE_DIRS + "include" + REQUIRES + joltwallet__littlefs + PRIV_REQUIRES + vfs + logger) diff --git a/components/web_server/CMakeLists.txt b/components/web_server/CMakeLists.txt index 080d042..e390e13 100644 --- a/components/web_server/CMakeLists.txt +++ b/components/web_server/CMakeLists.txt @@ -1,7 +1,16 @@ idf_component_register( - SRCS "src/web_server.c" - "src/wifi.c" - INCLUDE_DIRS "include" - REQUIRES esp_http_server storage - PRIV_REQUIRES freertos esp_wifi esp_event esp_netif nvs_flash logger -) + SRCS + "src/web_server.c" + "src/wifi.c" + INCLUDE_DIRS + "include" + REQUIRES + esp_http_server + storage + PRIV_REQUIRES + freertos + esp_wifi + esp_event + esp_netif + nvs_flash + logger) diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index 836026c..12392cc 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -1,3 +1,2 @@ -idf_component_register(SRCS "dmx-interface.c" - INCLUDE_DIRS "." - REQUIRES web_server) +idf_component_register(SRCS "dmx-interface.c" INCLUDE_DIRS "." REQUIRES + web_server) From 6c3dba7b5540a22e2aac26ade5f2c221815397ca Mon Sep 17 00:00:00 2001 From: HendrikRauh <114620133+HendrikRauh@users.noreply.github.com> Date: Mon, 16 Mar 2026 22:31:38 +0100 Subject: [PATCH 3/3] fix(.gitignore): add *.uf2 to ignore list for build artifacts --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 9c096f7..af425ae 100755 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ /build/ *.elf *.bin +*.uf2 *.hex *.map *.img