Skip to content

Commit b3d97d8

Browse files
committed
Merge branch 'docs/fix_pre_commit_hook' into 'master'
chore: Updated formatting according to pre-commit hooks See merge request application/esp-at!1944
2 parents 771ec3e + f2aba34 commit b3d97d8

File tree

39 files changed

+81
-125
lines changed

39 files changed

+81
-125
lines changed

.codespellrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[codespell]
22
skip = build,*.drawio,*.svg,*.pdf
3-
ignore-words-list = laf,OT,QUITT
3+
ignore-words-list = laf,OT,QUITT,rsource,inout
44
write-changes = true

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33

44
default_stages: [commit]
55

6+
# Exclude some directories or files from all hooks
7+
exclude: &global_excludes |
8+
(?x)^(
9+
.+\/STM32\/.+|
10+
.*.crt
11+
)$
12+
613
repos:
714
- repo: https://github.com/pre-commit/pre-commit-hooks
815
rev: v4.0.1

build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def at_sync_submodule(path, repo, branch, commit, redirect):
7777
raise Exception('git checkout failed! Please manually run:\r\n{}'.format(cmd))
7878

7979
if new_clone:
80-
# init submoules for cloned repository
80+
# init submodules for cloned repository
8181
ret = subprocess.call('cd {} && git submodule init'.format(path), shell = True)
8282
if ret:
8383
raise Exception('git submodule init failed')

components/at/include/at_compress_ota.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ extern "C" {
2121
*
2222
* An OTA method for saving flash space. Typical workflow:
2323
* Compress the firmware to be upgraded by compression algorithm, and pack into compressed image,
24-
* which inludes compressed image header (indicates the compressed image info and verify info) and compressed image body (compressed firmware).
24+
* which includes compressed image header (indicates the compressed image info and verify info) and compressed image body (compressed firmware).
2525
* Compress OTA will download the compressed image into special partition slot (type:0x01 subtype:0x22).
2626
* After reboot the module, esp-bootloader-plus (https://github.com/espressif/esp-bootloader-plus) will check if firmware needs to be upgraded.
2727
* If yes, esp-bootloader-plus will verify the integrity of compressed image, and then decompress it into the bootable partition slot.

components/at/include/esp_at.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ void esp_at_ready_before(void);
114114
* @param[in] expected_response: expected response string
115115
* @param[in] timeout_ms: timeout in milliseconds
116116
*
117-
* @note Once exprected response is received, the function will return immediately.
117+
* @note Once expected response is received, the function will return immediately.
118118
* @note You should not call this function directly from an AT command handler.
119119
* The AT command handler typically refers to the test command, query command, set command, and execute command
120120
* corresponding to the AT commands registered via esp_at_custom_cmd_array_regist().

components/at/include/esp_at_core.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -71,7 +71,7 @@ typedef struct {
7171
*/
7272
typedef enum {
7373
ESP_AT_STATUS_NORMAL = 0x0, /*!< Normal mode.Now mcu can send AT command */
74-
ESP_AT_STATUS_TRANSMIT, /*!< Transparent Transmition mode */
74+
ESP_AT_STATUS_TRANSMIT, /*!< Transparent Transmission mode */
7575

7676
} esp_at_status_type;
7777

@@ -256,7 +256,7 @@ void esp_at_transmit_terminal_from_isr(void);
256256
void esp_at_transmit_terminal(void);
257257

258258
/**
259-
* @brief regist at command set, which defined by custom,
259+
* @brief register at command set, which defined by custom,
260260
*
261261
* @param custom_at_cmd_array at command set
262262
* @param cmd_num command number
@@ -265,15 +265,15 @@ void esp_at_transmit_terminal(void);
265265
bool esp_at_custom_cmd_array_regist(const esp_at_cmd_struct *custom_at_cmd_array, uint32_t cmd_num);
266266

267267
/**
268-
* @brief regist device operate functions set,
268+
* @brief register device operate functions set,
269269
*
270270
* @param ops device operate functions set
271271
*
272272
*/
273273
void esp_at_device_ops_regist(esp_at_device_ops_struct* ops);
274274

275275
/*
276-
* @brief regist custom callback about socket status,
276+
* @brief register custom callback about socket status,
277277
*
278278
* @param link_id the link id
279279
* @param ops custom operate functions set
@@ -283,7 +283,7 @@ void esp_at_device_ops_regist(esp_at_device_ops_struct* ops);
283283
bool esp_at_custom_net_ops_regist(int32_t link_id, esp_at_custom_net_ops_struct* ops);
284284

285285
/*
286-
* @brief regist custom callback about ble status,
286+
* @brief register custom callback about ble status,
287287
*
288288
* @param ops custom operate functions set
289289
*
@@ -292,7 +292,7 @@ bool esp_at_custom_net_ops_regist(int32_t link_id, esp_at_custom_net_ops_struct*
292292
bool esp_at_custom_ble_ops_regist(int32_t conn_index, esp_at_custom_ble_ops_struct* ops);
293293

294294
/**
295-
* @brief regist custom operate functions set interacting with AT,
295+
* @brief register custom operate functions set interacting with AT,
296296
*
297297
* @param ops custom operate functions set
298298
*

components/at/src/at_web_dns_server.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ static int parse_dns_request(char *req, size_t req_len, char *dns_reply, size_t
161161
// Prepare the reply
162162
memcpy(dns_reply, req, req_len);
163163

164-
// Endianess of NW packet different from chip
164+
// Endianness of NW packet different from chip
165165
dns_header_t *header = (dns_header_t*)dns_reply;
166166
ESP_LOGD(TAG, "DNS req with header id: 0x%X, flags: 0x%X, qd_count: %d", ntohs(header->id), ntohs(header->flags), ntohs(header->qd_count));
167167

@@ -186,7 +186,7 @@ static int parse_dns_request(char *req, size_t req_len, char *dns_reply, size_t
186186
char *cur_qd_ptr = dns_reply + sizeof(dns_header_t);
187187

188188
char name[128] = {0};
189-
/* Repond to all questions with the ESP's IP address */
189+
/* Respond to all questions with the ESP's IP address */
190190
for (int i = 0; i < qd_count; i++) {
191191
char *name_end_ptr = parse_dns_name(cur_qd_ptr, name, sizeof(name));
192192
if (name_end_ptr == NULL) {

components/at/src/at_web_server_cmd.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
#ifdef CONFIG_AT_WEB_SERVER_SUPPORT
3838
#include "esp_http_server.h"
39-
// AT web can use fatfs to storge html or use embeded file to storge html.
39+
// AT web can use fatfs to storage html or use embedded file to storage html.
4040
// If use fatfs,we should enable AT FS Command support.
4141
#ifdef CONFIG_AT_WEB_USE_FATFS
4242
#include "esp_vfs_fat.h"
@@ -155,7 +155,7 @@ static const char *s_ota_receive_fail_response = "+WEBSERVERRSP:5\r\n";
155155
static SLIST_HEAD(router_fail_list_head_, router_obj) s_router_fail_list = SLIST_HEAD_INITIALIZER(s_router_fail_list);
156156
static const char *TAG = "at-web";
157157

158-
// AT web can use fatfs to storge html or use embeded file to storge html.
158+
// AT web can use fatfs to storage html or use embedded file to storage html.
159159
// If use fatfs,we should enable AT FS Command support.
160160
#ifdef CONFIG_AT_WEB_USE_FATFS
161161
static wl_handle_t s_wl_handle = WL_INVALID_HANDLE; // Handle of the wear levelling library instance
@@ -487,7 +487,7 @@ static esp_err_t at_web_start_scan_filter(uint8_t *phone_mac, uint8_t *password,
487487
memcpy(item->mac, ap_info[loop].bssid, sizeof(item->mac));
488488
// copy ssid
489489
memcpy(item->ssid, ap_info[loop].ssid, sizeof(item->ssid));
490-
// cpoy rssi
490+
// copy rssi
491491
item->rssi = ap_info[loop].rssi;
492492

493493
if (last == NULL) {
@@ -506,7 +506,7 @@ static esp_err_t at_web_start_scan_filter(uint8_t *phone_mac, uint8_t *password,
506506

507507
// If have mobile phone mac, first consider connect the router which has similar mac
508508
if (phone_mac != NULL) {
509-
ESP_LOGI(TAG, "Try to macth MAC");
509+
ESP_LOGI(TAG, "Try to match MAC");
510510
for (item = SLIST_FIRST(&s_router_all_list); (item != NULL) && (try_connect_count < max_try_connect_num); item = SLIST_NEXT(item, next)) {
511511
// some phone(like XIAOMI10), the difference between SOFTAP and STA is two bytes
512512
if ((at_web_get_mac_match_len(phone_mac, item->mac, sizeof(item->mac)) >= 5)) {
@@ -525,7 +525,7 @@ static esp_err_t at_web_start_scan_filter(uint8_t *phone_mac, uint8_t *password,
525525
}
526526
}
527527
if (item == NULL) {
528-
ESP_LOGI(TAG, "No macth MAC");
528+
ESP_LOGI(TAG, "No match MAC");
529529
}
530530
}
531531
#if ESP_AT_WEB_ENABLE_VIRTUAL_MAC_MATCH
@@ -545,7 +545,7 @@ static esp_err_t at_web_start_scan_filter(uint8_t *phone_mac, uint8_t *password,
545545
} else {
546546
s_connect_success_flag = 1;
547547
}
548-
break; // find ssid, skip seach
548+
break; // find ssid, skip search
549549
}
550550
}
551551
}
@@ -691,7 +691,7 @@ static int at_web_find_arg(char *line, char *arg, char *buff, int buffLen)
691691
return -1; // not found
692692
}
693693

694-
// AT web can use fatfs to storge html or use embeded file to storge html.
694+
// AT web can use fatfs to storage html or use embedded file to storage html.
695695
// If use fatfs,we should enable AT FS Command support.
696696
#ifdef CONFIG_AT_WEB_USE_FATFS
697697
/* Send HTTP response with the contents of the requested file */
@@ -867,7 +867,7 @@ static void listen_sta_connect_status_timer_cb(TimerHandle_t timer)
867867
esp_netif_t *sta_if = esp_netif_get_handle_from_ifkey("WIFI_STA_DEF");
868868

869869
if (connect_count < connect_max_count) {
870-
sta_got_ip = at_web_get_sta_got_ip_flag(); // to check whether sta has connnected to appointed ap(like at_wifi_station_get_connect_status())
870+
sta_got_ip = at_web_get_sta_got_ip_flag(); // to check whether sta has connected to appointed ap(like at_wifi_station_get_connect_status())
871871
if (sta_got_ip != true) {
872872
connect_count++;
873873
return;
@@ -958,7 +958,7 @@ static void listen_sta_connect_success_timer_cb(TimerHandle_t timer)
958958
wifi_sta_connection_info_t *current_connection_info = at_web_get_sta_connection_info();
959959

960960
if (current_connection_info->config_status == ESP_AT_WIFI_STA_CONNECTING) {
961-
sta_got_ip = at_web_get_sta_got_ip_flag(); // to check whether sta has connnected to appointed ap(like at_wifi_station_get_connect_status())
961+
sta_got_ip = at_web_get_sta_got_ip_flag(); // to check whether sta has connected to appointed ap(like at_wifi_station_get_connect_status())
962962
if (sta_got_ip != true) {
963963
return;
964964
} else {
@@ -973,7 +973,7 @@ static void listen_sta_connect_success_timer_cb(TimerHandle_t timer)
973973
/**
974974
* @brief Apply WiFi connect info to try connect
975975
*
976-
* @param[in] udp_port: indicates the device in use, -1: brower, others: WeChat;
976+
* @param[in] udp_port: indicates the device in use, -1: browser, others: WeChat;
977977
* when Wechat is in use and ssid is null, we use udp send wifi connect result.
978978
*
979979
* @return
@@ -1435,7 +1435,7 @@ static esp_err_t ap_record_get_handler(httpd_req_t *req)
14351435

14361436
for (loop = 0; loop < ap_number; loop++) {
14371437
int32_t ssid_len = strlen((const char*)ap_info[loop].ssid);
1438-
if (ssid_len != 0) { // ingore hidden ssid
1438+
if (ssid_len != 0) { // ignore hidden ssid
14391439
json_len += sprintf(temp_json_str + json_len, "{\"ssid\":\"");
14401440
for (int i = 0; i < ssid_len; i++) {
14411441
uint8_t c = ap_info[loop].ssid[i];
@@ -1891,7 +1891,7 @@ static esp_err_t at_web_start(uint16_t server_port)
18911891
esp_err_t err;
18921892

18931893
if (s_server == NULL) {
1894-
/*AT web can use fatfs to storge html or use embeded file to storge html.If use fatfs, we should enable AT FS Command support*/
1894+
/*AT web can use fatfs to storage html or use embedded file to storage html.If use fatfs, we should enable AT FS Command support*/
18951895
#ifdef CONFIG_AT_WEB_USE_FATFS
18961896
err = at_web_fatfs_spiflash_init();
18971897
if (err != ESP_OK) {

components/customized_partitions/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ In building customized partition bin stage:
5757
2. try to find generation tool from `generation_tool` folder
5858
* if tool is not found, then skip generating this partition bin
5959
3. run generation tool, generate customized bin
60-
* the generation tool can specify its raw data folder. by default the raw data will be put into `raw_data/partition_name` of component customzied partitions
60+
* the generation tool can specify its raw data folder. by default the raw data will be put into `raw_data/partition_name` of component customized partitions
6161
* if generation tools did not exit 0, it will report error and stop build
6262
4. copy bin to `build/customized_partitions` folder and update to flash args
6363

components/customized_partitions/at_customized_target_generate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def main():
5656

5757
# check fatfs dependency
5858
if 'fatfs' in to_read_config_name and 'fatfs' not in to_write_partition:
59-
print('FatFS is required in sdkconfig but not found in parition table. Please check the at_customize.csv')
59+
print('FatFS is required in sdkconfig but not found in partition table. Please check the at_customize.csv')
6060
sys.exit(1)
6161

6262
with open(flash_args_file, 'w+') as args_file:

0 commit comments

Comments
 (0)