From bbbd766f554cb3d814b72229907488abfaff3444 Mon Sep 17 00:00:00 2001 From: Jakob Hasse <0xjakob@users.noreply.github.com> Date: Mon, 3 Apr 2023 13:59:22 +0800 Subject: [PATCH] refactor: updated cmake version, added editorconfig --- .editorconfig | 27 +++++++++++++++++++ CONTRIBUTING.md | 2 +- examples/blink_cxx/CMakeLists.txt | 2 +- examples/esp_event_async_cxx/CMakeLists.txt | 2 +- examples/esp_timer_cxx/CMakeLists.txt | 2 +- examples/simple_i2c_rw_example/CMakeLists.txt | 2 +- examples/simple_spi_rw_example/CMakeLists.txt | 2 +- host_test/esp_timer/CMakeLists.txt | 2 +- host_test/gpio/CMakeLists.txt | 2 +- host_test/i2c/CMakeLists.txt | 2 +- host_test/spi/CMakeLists.txt | 2 +- host_test/system/CMakeLists.txt | 2 +- test_apps/esp_event/CMakeLists.txt | 2 +- test_apps/esp_timer/CMakeLists.txt | 2 +- 14 files changed, 40 insertions(+), 13 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..c852cdf --- /dev/null +++ b/.editorconfig @@ -0,0 +1,27 @@ +# EditorConfig helps developers define and maintain consistent +# coding styles between different editors and IDEs +# http://editorconfig.org + +root = true + +[*] +indent_style = space +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[{*.md,*.rst}] +trim_trailing_whitespace = false + +[*.py] +max_line_length = 119 + +[{*.cmake,CMakeLists.txt}] +indent_style = space +indent_size = 4 +max_line_length = 120 + +[{*.sh,*.yml,*.yaml}] +indent_size = 2 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ebd8844..4523d25 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,6 +2,6 @@ Contributions to ESP-IDF-CXX - fixing bugs, adding features, adding documentation - are welcome! We accept contributions via Github Pull Requests. -Currently, we use the same contribution guidelines as ESP-IDF itself as basis. Please see the [ESP-IDF Contributions Guide](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/contribute/index.html) for more information. However, the workflow is quite simplified, we only use github for collaboration. Furthermore, we use the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) format for commits. +Currently, we use the same contribution guidelines as ESP-IDF itself as basis. Please refer to the [ESP-IDF Contributions Guide](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/contribute/index.html) for more information. However, the workflow is quite simplified, we only use github for collaboration. Furthermore, we use the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) format for commits. There is an [editorconfig file](.editorconfig) to setup your editor or IDE with some basic options (tab-style, line ending, etc.). Please also consider the legal part: You will be required to sign the [Contributor Agreement](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/contribute/contributor-agreement.html) for any Pull Request. diff --git a/examples/blink_cxx/CMakeLists.txt b/examples/blink_cxx/CMakeLists.txt index a74d574..50253d4 100644 --- a/examples/blink_cxx/CMakeLists.txt +++ b/examples/blink_cxx/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) set(COMPONENTS main) diff --git a/examples/esp_event_async_cxx/CMakeLists.txt b/examples/esp_event_async_cxx/CMakeLists.txt index 5e28687..47f4d82 100644 --- a/examples/esp_event_async_cxx/CMakeLists.txt +++ b/examples/esp_event_async_cxx/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) set(COMPONENTS main) diff --git a/examples/esp_timer_cxx/CMakeLists.txt b/examples/esp_timer_cxx/CMakeLists.txt index d5d85e4..3dc0f1b 100644 --- a/examples/esp_timer_cxx/CMakeLists.txt +++ b/examples/esp_timer_cxx/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) set(COMPONENTS main) diff --git a/examples/simple_i2c_rw_example/CMakeLists.txt b/examples/simple_i2c_rw_example/CMakeLists.txt index aa3eb2f..3a31bc5 100644 --- a/examples/simple_i2c_rw_example/CMakeLists.txt +++ b/examples/simple_i2c_rw_example/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) set(COMPONENTS main) diff --git a/examples/simple_spi_rw_example/CMakeLists.txt b/examples/simple_spi_rw_example/CMakeLists.txt index 908dcf7..cf314a3 100644 --- a/examples/simple_spi_rw_example/CMakeLists.txt +++ b/examples/simple_spi_rw_example/CMakeLists.txt @@ -1,6 +1,6 @@ # The following 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.5) +cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) set(COMPONENTS main) diff --git a/host_test/esp_timer/CMakeLists.txt b/host_test/esp_timer/CMakeLists.txt index b7c305c..035db36 100644 --- a/host_test/esp_timer/CMakeLists.txt +++ b/host_test/esp_timer/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) set(COMPONENTS main) diff --git a/host_test/gpio/CMakeLists.txt b/host_test/gpio/CMakeLists.txt index f1e10ac..e50a35c 100644 --- a/host_test/gpio/CMakeLists.txt +++ b/host_test/gpio/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) set(COMPONENTS main) diff --git a/host_test/i2c/CMakeLists.txt b/host_test/i2c/CMakeLists.txt index 7b71b46..cb95707 100644 --- a/host_test/i2c/CMakeLists.txt +++ b/host_test/i2c/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) set(COMPONENTS main) diff --git a/host_test/spi/CMakeLists.txt b/host_test/spi/CMakeLists.txt index 7df78c3..6db45f8 100644 --- a/host_test/spi/CMakeLists.txt +++ b/host_test/spi/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) set(COMPONENTS main) diff --git a/host_test/system/CMakeLists.txt b/host_test/system/CMakeLists.txt index 945b0dc..44ddb28 100644 --- a/host_test/system/CMakeLists.txt +++ b/host_test/system/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) set(COMPONENTS main) diff --git a/test_apps/esp_event/CMakeLists.txt b/test_apps/esp_event/CMakeLists.txt index 9502681..488c9d9 100644 --- a/test_apps/esp_event/CMakeLists.txt +++ b/test_apps/esp_event/CMakeLists.txt @@ -1,5 +1,5 @@ # This is the project CMakeLists.txt file for the test subproject -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.16) set(COMPONENTS main) diff --git a/test_apps/esp_timer/CMakeLists.txt b/test_apps/esp_timer/CMakeLists.txt index c4e1a74..5b38765 100644 --- a/test_apps/esp_timer/CMakeLists.txt +++ b/test_apps/esp_timer/CMakeLists.txt @@ -1,5 +1,5 @@ # This is the project CMakeLists.txt file for the test subproject -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.16) set(COMPONENTS main)