2022-09-08 02:48:30 -04:00
|
|
|
|
DEFAULT:
|
|
|
|
|
# These formatting options will be used by default.
|
|
|
|
|
# If you are modifying this, update tools/format.sh as well!
|
|
|
|
|
options: "--style=otbs --attach-namespaces --attach-classes --indent=spaces=4 --convert-tabs --align-reference=name --keep-one-line-statements --pad-header --pad-oper --unpad-paren --max-continuation-indent=120"
|
|
|
|
|
|
|
|
|
|
submodules:
|
|
|
|
|
# Don't format the code in submodules
|
|
|
|
|
check: false
|
|
|
|
|
include:
|
|
|
|
|
- "/components/bootloader/subproject/components/micro-ecc/micro-ecc/"
|
|
|
|
|
- "/components/bt/controller/lib_esp32/"
|
|
|
|
|
- "/components/bt/controller/lib_esp32c2/esp32c2-bt-lib/"
|
|
|
|
|
- "/components/bt/controller/lib_esp32c3_family/"
|
|
|
|
|
- "/components/bt/controller/lib_esp32c6/esp32c6-bt-lib/"
|
|
|
|
|
- "/components/bt/controller/lib_esp32h2/esp32h2-bt-lib/"
|
|
|
|
|
- "/components/bt/host/nimble/nimble/"
|
2023-11-07 20:57:57 -05:00
|
|
|
|
- "/components/bt/esp_ble_mesh/lib/lib/"
|
2022-09-08 02:48:30 -04:00
|
|
|
|
- "/components/cmock/CMock/"
|
|
|
|
|
- "/components/esp_coex/lib/"
|
|
|
|
|
- "/components/esp_phy/lib/"
|
|
|
|
|
- "/components/esp_wifi/lib/"
|
|
|
|
|
- "/components/heap/tlsf/"
|
|
|
|
|
- "/components/json/cJSON/"
|
|
|
|
|
- "/components/lwip/lwip/"
|
|
|
|
|
- "/components/mbedtls/mbedtls/"
|
|
|
|
|
- "/components/mqtt/esp-mqtt/"
|
|
|
|
|
- "/components/openthread/lib/"
|
|
|
|
|
- "/components/openthread/openthread/"
|
|
|
|
|
- "/components/protobuf-c/protobuf-c/"
|
|
|
|
|
- "/components/spiffs/spiffs/"
|
|
|
|
|
- "/components/unity/unity/"
|
|
|
|
|
|
|
|
|
|
components_not_formatted_temporary:
|
|
|
|
|
# Formatting in these components isn't checked yet.
|
|
|
|
|
# For each of these components, decide whether it should be formatted or not.
|
|
|
|
|
# 1. If yes, format the code and remove the component from the exclude list.
|
|
|
|
|
# Add special rules for upstream source files, if necessary.
|
|
|
|
|
# To reformat the files:
|
|
|
|
|
# - Remove the directory from this exclude list
|
|
|
|
|
# - Run 'git add .astyle-rules.yml'
|
2024-01-26 09:07:54 -05:00
|
|
|
|
# - Run 'pre-commit run --all-files' to run all pre-commit hooks
|
|
|
|
|
# - Run 'pre-commit run astyle_py --all-files' to run only the astyle_py hook
|
2022-09-08 02:48:30 -04:00
|
|
|
|
# 2. If no, move it to 'components_not_formatted_permanent' section below.
|
|
|
|
|
check: false
|
|
|
|
|
include:
|
|
|
|
|
- "/components/app_trace/"
|
|
|
|
|
- "/components/app_update/"
|
|
|
|
|
- "/components/bootloader_support/"
|
|
|
|
|
- "/components/bootloader/"
|
|
|
|
|
- "/components/bt/"
|
|
|
|
|
- "/components/cmock/"
|
|
|
|
|
- "/components/console/"
|
|
|
|
|
- "/components/cxx/"
|
|
|
|
|
- "/components/efuse/"
|
|
|
|
|
- "/components/esp_coex/"
|
|
|
|
|
- "/components/esp_eth/"
|
|
|
|
|
- "/components/esp_gdbstub/"
|
|
|
|
|
- "/components/esp_http_client/"
|
|
|
|
|
- "/components/esp_http_server/"
|
|
|
|
|
- "/components/esp_https_ota/"
|
|
|
|
|
- "/components/esp_https_server/"
|
|
|
|
|
- "/components/esp_hw_support/"
|
|
|
|
|
- "/components/esp_local_ctrl/"
|
|
|
|
|
- "/components/esp_netif/"
|
|
|
|
|
- "/components/esp_partition/"
|
|
|
|
|
- "/components/esp_phy/"
|
|
|
|
|
- "/components/esp_pm/"
|
|
|
|
|
- "/components/esp_rom/"
|
|
|
|
|
- "/components/esp_wifi/"
|
|
|
|
|
- "/components/esp-tls/"
|
|
|
|
|
- "/components/esptool_py/"
|
|
|
|
|
- "/components/fatfs/"
|
|
|
|
|
- "/components/hal/"
|
|
|
|
|
- "/components/heap/"
|
|
|
|
|
- "/components/idf_test/"
|
|
|
|
|
- "/components/ieee802154/"
|
|
|
|
|
- "/components/json/"
|
|
|
|
|
- "/components/lwip/"
|
|
|
|
|
- "/components/mbedtls/"
|
|
|
|
|
- "/components/mqtt/"
|
|
|
|
|
- "/components/nvs_flash/"
|
|
|
|
|
- "/components/nvs_sec_provider/"
|
|
|
|
|
- "/components/openthread/"
|
|
|
|
|
- "/components/partition_table/"
|
|
|
|
|
- "/components/perfmon/"
|
|
|
|
|
- "/components/protobuf-c/"
|
|
|
|
|
- "/components/protocomm/"
|
|
|
|
|
- "/components/riscv/"
|
|
|
|
|
- "/components/sdmmc/"
|
|
|
|
|
- "/components/soc/"
|
|
|
|
|
- "/components/spi_flash/"
|
|
|
|
|
- "/components/spiffs/"
|
|
|
|
|
- "/components/tcp_transport/"
|
|
|
|
|
- "/components/touch_element/"
|
|
|
|
|
- "/components/unity/"
|
|
|
|
|
- "/components/vfs/"
|
|
|
|
|
- "/components/wear_levelling/"
|
|
|
|
|
- "/components/wifi_provisioning/"
|
|
|
|
|
- "/components/wpa_supplicant/"
|
|
|
|
|
- "/components/xtensa/"
|
|
|
|
|
- "/examples/bluetooth/"
|
|
|
|
|
- "/examples/build_system/"
|
|
|
|
|
- "/examples/common_components/"
|
|
|
|
|
- "/examples/custom_bootloader/"
|
|
|
|
|
- "/examples/cxx/"
|
|
|
|
|
- "/examples/ethernet/"
|
|
|
|
|
- "/examples/get-started/"
|
|
|
|
|
- "/examples/mesh/"
|
|
|
|
|
- "/examples/network/"
|
|
|
|
|
- "/examples/openthread/"
|
|
|
|
|
- "/examples/phy/"
|
|
|
|
|
- "/examples/protocols/"
|
|
|
|
|
- "/examples/provisioning/"
|
|
|
|
|
- "/examples/security/"
|
|
|
|
|
- "/examples/storage/"
|
|
|
|
|
- "/examples/system/"
|
|
|
|
|
- "/examples/wifi/"
|
|
|
|
|
- "/examples/zigbee/"
|
|
|
|
|
- "/tools/esp_app_trace/test/"
|
|
|
|
|
- "/tools/mocks/"
|
|
|
|
|
- "/tools/test_apps/"
|
|
|
|
|
- "/tools/unit-test-app/"
|
|
|
|
|
|
|
|
|
|
components_not_formatted_permanent:
|
|
|
|
|
# Files which are not supposed to be formatted.
|
|
|
|
|
# Typically, these are:
|
|
|
|
|
# - Upstream source code we don't want to modify
|
|
|
|
|
# - Generated files
|
|
|
|
|
check: false
|
|
|
|
|
include:
|
|
|
|
|
# Xtensa header files (generated)
|
|
|
|
|
- "/components/xtensa/esp32/"
|
|
|
|
|
- "/components/xtensa/esp32s2/"
|
|
|
|
|
- "/components/xtensa/esp32s3/"
|
|
|
|
|
- "/components/xtensa/include/xtensa/"
|
|
|
|
|
# FAT FS (upstream source code)
|
|
|
|
|
- "/components/fatfs/src/"
|
|
|
|
|
# Nginx HTTP parser (upstream source code)
|
|
|
|
|
- "/components/http_parser/"
|
|
|
|
|
# Argtable (upstream source code)
|
|
|
|
|
- "/components/console/argtable3/"
|
|
|
|
|
# Linenoise (upstream source code)
|
|
|
|
|
- "/components/console/linenoise/"
|
|
|
|
|
# Catch (upstream source code)
|
|
|
|
|
- "/tools/catch/catch.hpp"
|
2024-01-26 09:07:54 -05:00
|
|
|
|
# FreeRTOS kernel files (upstream source code)
|
2022-09-08 02:48:30 -04:00
|
|
|
|
- "/components/freertos/FreeRTOS-Kernel/"
|
|
|
|
|
- "/components/freertos/FreeRTOS-Kernel-SMP/"
|
2024-01-26 09:07:54 -05:00
|
|
|
|
# FreeRTOS additions to the upstream source code
|
|
|
|
|
- "/components/freertos/esp_additions/"
|
|
|
|
|
# FreeRTOS config files maintained in upstream format
|
|
|
|
|
- "/components/freertos/config/"
|
2022-09-08 02:48:30 -04:00
|
|
|
|
# Segger SystemView (upstream source code).
|
|
|
|
|
# Could also try to find suitable astyle options, instead.
|
|
|
|
|
- "/components/app_trace/sys_view/Config/"
|
|
|
|
|
- "/components/app_trace/sys_view/Sample/"
|
|
|
|
|
- "/components/app_trace/sys_view/SEGGER/"
|
|
|
|
|
# SoC header files (generated)
|
|
|
|
|
- "/components/soc/*/include/soc/"
|
2023-09-27 21:43:12 -04:00
|
|
|
|
# Example resource files (generated)
|
|
|
|
|
- "/examples/peripherals/lcd/i80_controller/main/images/"
|
|
|
|
|
- "/examples/peripherals/dac/dac_continuous/dac_audio/main/audio_example_file.h"
|
2024-02-19 15:51:12 -05:00
|
|
|
|
# Coredump (generated)
|
|
|
|
|
- /components/espcoredump/include_core_dump/elf.h
|
2022-09-08 02:48:30 -04:00
|
|
|
|
|
|
|
|
|
docs:
|
|
|
|
|
# Docs directory contains some .inc files, which are not C include files
|
|
|
|
|
# and should not be formatted
|
|
|
|
|
check: false
|
|
|
|
|
include:
|
|
|
|
|
- "/docs/**/*.inc"
|