Skip to content

Commit

Permalink
Merge pull request #106 from PelionIoT/misspell
Browse files Browse the repository at this point in the history
misspell - github action & spelling fixes
  • Loading branch information
JanneKiiskila authored Oct 18, 2023
2 parents df99b7d + 4a2099a commit 5ec8687
Show file tree
Hide file tree
Showing 21 changed files with 57 additions and 35 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/misspell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: misspell
on: push

# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: mbed-edge-misspell-'${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true

jobs:
static-checks:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Run misspell (findings may not increase)
if: always()
run: |
curl -L -o ./install-misspell.sh https://git.io/misspell
sh ./install-misspell.sh
bin/misspell -i mosquitto .
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Changelog for Edge

## Release 0.x.y
* Fixed numerous small spelling mistakes pointed by `misspell`.
## Release 0.21.0

* Update mbed-cloud-client to version 4.13.1.
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#For Cmake system, if we want to compile all projects with cross toolchain. Then we should set the CMAKE_TOOLCHAIN_FILE as the 1st step.
#More information could be refered to here:
#More information could be referred to here:
#https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/CrossCompiling

# Check if user initialized and updated git submodules
Expand Down
2 changes: 1 addition & 1 deletion edge-client/edge-client/edge_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ const char* edgeclient_get_endpoint_name();
/**
* \brief Check if Edge Client is shutting down. If it is, it's no longer allowed to send new data to Device Management.
* \return true if the shutdown process has started.
* false if shutdown proces hasn't been started.
* false if shutdown process hasn't been started.
*/
bool edgeclient_is_shutting_down();

Expand Down
2 changes: 1 addition & 1 deletion edge-client/edge-client/edge_client_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ class EdgeClientImpl : MbedCloudClientCallback {
stop_client();
error = "UNKNOWN";
}
tr_error("Error occured : %s", error);
tr_error("Error occurred : %s", error);
tr_error("Error code : %d", error_code);
tr_error("Error details : %s",_cloud_client.error_description());
if (_on_error_cb) {
Expand Down
2 changes: 1 addition & 1 deletion edge-client/edge_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1514,7 +1514,7 @@ EDGE_LOCAL void edgeclient_setup_credentials(bool reset_storage, byoc_data_t *by
tr_err("Failed to do factory reset - %d - exit", kcm_status);
exit(1);
} else {
tr_info("Factory reset successfull - retry verifying device config");
tr_info("Factory reset successful - retry verifying device config");
status = fcc_verify_device_configured_4mbed_cloud();
if (status != FCC_STATUS_SUCCESS && status != FCC_STATUS_EXPIRED_CERTIFICATE) {
tr_error("Device not configured for Device Management - exit");
Expand Down
4 changes: 2 additions & 2 deletions edge-core/mgmt_api_internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ int write_resource(json_t *request, json_t *json_params, json_t **result, void *
free(mgmt_ctx->request_id);
free(mgmt_ctx);
free(uri_with_device);
return 1; // error occured.
return 1; // error occurred.
}
} else {
tr_debug("write_resource: edgeclient request context is NULL. Failing.");
Expand All @@ -442,7 +442,7 @@ int write_resource(json_t *request, json_t *json_params, json_t **result, void *
free(mgmt_ctx->request_id);
free(mgmt_ctx);
}
return 1; // error occured.
return 1; // error occurred.
}

struct jsonrpc_method_entry_t mgmt_api_method_table[] = {{"devices", devices, "o"},
Expand Down
2 changes: 1 addition & 1 deletion edge-rpc/edge-rpc/rpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ int32_t rpc_construct_and_send_response(struct connection *connection,
* \param write_func The function to use for writing data back.
* \param protocol_error The flag is set to true if the frame data cannot be parsed or response message cannot be
* matched. Otherwise it is set to false.
* \param mutex_acquired The flag telling wheter the `rpc_mutex` is already acquired.
* \param mutex_acquired The flag telling whether the `rpc_mutex` is already acquired.
* \return 0 for success.\n
* 1 for failure.
*/
Expand Down
2 changes: 1 addition & 1 deletion edge-tool/test_data/update_default_resources.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const uint8_t arm_uc_class_id[] = {
const uint16_t arm_uc_class_id_size = sizeof(arm_uc_class_id);

// TODO: remove it when no longer used
// This value is here for backwards compatability purposes - it is not used
// This value is here for backwards compatibility purposes - it is not used
const uint8_t arm_uc_default_fingerprint[] = {
0
};
Expand Down
2 changes: 1 addition & 1 deletion git_details.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function(SET_EDGE_VERSION_VARIABLES)
message("Setting dummy values to versioning variables.")
set(RELEASE_VERSION "unknown-release" CACHE INTERNAL "Edge release version")
set(GIT_BRANCH "branchless" CACHE INTERNAL "Edge Git branch")
set(GIT_COMMIT "uncommited" CACHE INTERNAL "Edge Git commit")
set(GIT_COMMIT "uncommitted" CACHE INTERNAL "Edge Git commit")
set(GIT_DIRTY "uninited" CACHE INTERNAL "Edge Git if dirty")
set(WRITE_VERSION_FILE 1 CACHE INTERNAL "Edge version file write")
endif()
Expand Down
2 changes: 1 addition & 1 deletion include/common/integer_length.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ uint16_t edge_int_length(uint32_t value);
* \param str String to convert. String must be NUL-terminated.
* \param result The pointer where to store the result.
* \return 0 if conversion succeeded.\n
1 if an error occured when converting str to uint16_t.
1 if an error occurred when converting str to uint16_t.
*/
int edge_str_to_uint16_t(const char *str, uint16_t *result);

Expand Down
22 changes: 11 additions & 11 deletions include/pt-client-2/pt_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,10 @@
* of the value must be implemented in the callback function.
*
* \param[in] connection_id The ID of the connection of the requesting application.
* \param[in] device_id The device ID targetted for this callback.
* \param[in] object_id The object ID targetted.
* \param[in] object_instance_id The object instance ID targetted.
* \param[in] resource_id The resource ID targetted.
* \param[in] device_id The device ID targeted for this callback.
* \param[in] object_id The object ID targeted.
* \param[in] object_instance_id The object instance ID targeted.
* \param[in] resource_id The resource ID targeted.
* \param[in] operation The operation, for example OPERATION_WRITE.
* \param[in] value A pointer to the value buffer.\n
* The ownership of the value buffer is within the `pt_resource_t` and the pointer is only valid for the
Expand Down Expand Up @@ -217,7 +217,7 @@ typedef void (*pt_device_response_handler)(const connection_id_t connection_id,
* \param[in] device_id The unique device identifier.
* \param[in] lifetime The expected lifetime for the device. The device
* registrations must be updated. This parameter is reserved and currently not used.
* The translated endpoints are tracked withing the parent Edge device lifetime.
* The translated endpoints are tracked within the parent Edge device lifetime.
* \param[in] queuemode The queue mode before the time is elapsed. This parameter is reserved, but currently not used.
* \param[in] userdata The user data to add to the `pt_device_t` structure. Create this structure with
* `pt_api_create_device_userdata()`.
Expand Down Expand Up @@ -253,7 +253,7 @@ pt_status_t pt_download_asset(const connection_id_t connection_id,
* \param[in] device_id The unique device identifier.
* \param[in] lifetime The expected lifetime for the device. The device
* registrations must be updated. This parameter is reserved and currently not used.
* The translated endpoints are tracked withing the parent Edge device lifetime.
* The translated endpoints are tracked within the parent Edge device lifetime.
* \param[in] queuemode The queue mode before the time is elapsed. This parameter is reserved, but currently not used.
* \param[in] features The feature flags for enabling features this device supports. See `pt_device_feature_e` enum
* in `pt_common_api.h` for supported feature flags.
Expand All @@ -278,7 +278,7 @@ pt_status_t pt_device_create_with_feature_flags(const connection_id_t connection
* \param[in] device_id The unique device identifier.
* \param[in] lifetime The expected lifetime for the device. The device
* registrations must be updated. This parameter is reserved and currently not used.
* The translated endpoints are tracked withing the parent Edge device lifetime.
* The translated endpoints are tracked within the parent Edge device lifetime.
* \param[in] queuemode The queue mode before the time is elapsed. This parameter is reserved, but currently not used.
*
* \return `PT_STATUS_SUCCESS` in case of success. Other error codes for failure.
Expand Down Expand Up @@ -373,10 +373,10 @@ pt_status_t pt_device_write_values(const connection_id_t connection_id,
* Edge Core. This function can called multiple times for the device before updating the value to Edge Core.
*
* \param[in] connection_id The ID of the connection of the requesting application.
* \param[in] device_id The device ID targetted for the write.
* \param[in] object_id The object ID targetted.
* \param[in] object_instance_id The object instance ID targetted.
* \param[in] resource_id The resource ID targetted.
* \param[in] device_id The device ID targeted for the write.
* \param[in] object_id The object ID targeted.
* \param[in] object_instance_id The object instance ID targeted.
* \param[in] resource_id The resource ID targeted.
* \param[in] value The value to write to the resource.
* \param[in] value_len The size of the value to write.
* \param[in] value_free_cb A callback function to free the value buffer that will be called when the resource is
Expand Down
2 changes: 1 addition & 1 deletion include/pt-client-2/pt_certificate_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ typedef void (*pt_device_certificate_renew_response_handler)(const connection_id
* \param name The name of the certificate.
* \param userdata. The Userdata which was passed to `pt_client_start`.
*
* \return The callback should return PT_STATUS_SUCCESS if the renewal process was started succesfully.
* \return The callback should return PT_STATUS_SUCCESS if the renewal process was started successfully.
* If the renewal could not be started or there was some error, an error should be returned.
* See ::pt_status_t for possible error codes.
*/
Expand Down
4 changes: 2 additions & 2 deletions include/pt-client/pt_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ DEPRECATED(pt_device_userdata_t *pt_api_create_device_userdata(void *data,
* `device_id` is transferred to returned `pt_device_t`
* \param lifetime The expected lifetime for the device. The device
* registrations must be updated. This parameter is reserved and currently not used.
* The translated endpoints are tracked withing the parent Edge device lifetime.
* The translated endpoints are tracked within the parent Edge device lifetime.
* \param queuemode The queue mode before the time is elapsed.
* \param status A pointer to user provided variable for the operation status
* output. If a device was created, the status will be set to `PT_STATUS_SUCCESS`.
Expand All @@ -494,7 +494,7 @@ DEPRECATED(
* `device_id` is transferred to returned `pt_device_t`
* \param lifetime The expected lifetime for the device. The device
* registrations must be updated. This parameter is reserved and currently not used.
* The translated endpoints are tracked withing the parent Edge device lifetime.
* The translated endpoints are tracked within the parent Edge device lifetime.
* \param queuemode The queue mode before the time is elapsed.
* \param status A pointer to user provided variable for the operation status
* output. If a device was created, the status will be set to `PT_STATUS_SUCCESS`.
Expand Down
4 changes: 2 additions & 2 deletions lib/jsonrpc/jsonrpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ char *jsonrpc_handler(const char *input,
NULL));
json_array_append_new(json_response, rep);
} else if (rc == -1) {
tr_error("Protocol error: reponse is not matched to any request.");
tr_error("Protocol error: response is not matched to any request.");
*ret_rc = JSONRPC_HANDLER_REQUEST_NOT_MATCHED;
}
} else {
Expand All @@ -328,7 +328,7 @@ char *jsonrpc_handler(const char *input,
// payload is response
int rc = response_handler(userdata->connection, json_request);
if (rc == -1) {
tr_error("Protocol error: reponse is not matched to any request.");
tr_error("Protocol error: response is not matched to any request.");
*ret_rc = JSONRPC_HANDLER_REQUEST_NOT_MATCHED;
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion lib/pal-platform/Toolchain/ARMGCC/ARMGCC.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ ENDIF()
#SET (CMAKE_EXECUTABLE_SUFFIX ".elf")


#zeroing previos declard flags
#zeroing previous declard flags
#set(CMAKE_EXE_LINKER_FLAGS_DEBUG "")
#set(CMAKE_EXE_LINKER_FLAGS_RELESE "")
# TOOLCHAIN_DIR AND NANO LIBRARY
Expand Down
8 changes: 4 additions & 4 deletions lib/pal-platform/pal-platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def git_fetch_submodule(submodule_name, overwrite_url, overwrite_branch, dest_di
# Use submodule configuration to update the submodule
check_cmd(['git', 'submodule', 'update', '--init', '--recursive', '--remote', '--', submodule_name], cwd=dest_dir, **stream_kwargs)
else:
logger.info('Updating submodule \'%s\' from %s at superproject\'s commited hash', submodule_name, url)
logger.info('Updating submodule \'%s\' from %s at superproject\'s committed hash', submodule_name, url)
# Use the superproject's recorded SHA-1 to update the submodule
check_cmd(['git', 'submodule', 'update', '--init', '--recursive', '--', submodule_name], cwd=dest_dir, **stream_kwargs)

Expand Down Expand Up @@ -508,7 +508,7 @@ def fetch(self, dst, name):
git_fetch(self.location, self.tag, dst, self.submodules, **self.stream_kwargs)
except Exception as e:
logger.error(e)
logger.error("** failed to fetch %s from git - please check that remote is correct and avialable **", name)
logger.error("** failed to fetch %s from git - please check that remote is correct and available **", name)
sys.exit()

class LocalSource(Source):
Expand Down Expand Up @@ -972,9 +972,9 @@ def getPathForToolChainInPath(toolchain):

def checkToolchainEnv(toolchain):
logger.info('Checking Environment for Toolchain - %s', toolchain)
#toolchain_env stucture: key == toolchain name , value is a tupple with two elements:
#toolchain_env structure: key == toolchain name , value is a tupple with two elements:
#1. a tuple of relevant environment variables for the toolchain - Note : the first value is the one we want (we will export it if any of the values are found)
#2. a string with the expected name of compiler binary for path seach
#2. a string with the expected name of compiler binary for path search
toolchainEnv = {"ARMCC":(("ARMCC_DIR", "ARM_PATH", "MBED_ARM_PATH"), "armcc"),
"ARMGCC":(("ARMGCC_DIR", "GCC_ARM_PATH", "MBED_GCC_ARM_PATH"), "arm-none-eabi-gcc"),
"GCC": (("GCC_DIR",), "gcc"),
Expand Down
2 changes: 1 addition & 1 deletion pt-client-2/pt_certificate_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ EDGE_LOCAL pt_ce_status_e certificate_renew_parse_request(const uint8_t *data, c
EDGE_LOCAL void certificate_renew_execute_success_handler(connection_id_t connection_id, const char *device_id, void *ctx)
{
(void) connection_id;
tr_debug("Certificate renew status sent sucessfully.");
tr_debug("Certificate renew status sent successfully.");
}

EDGE_LOCAL void certificate_renew_execute_failure_handler(connection_id_t connection_id, const char *device_id, void *ctx)
Expand Down
2 changes: 1 addition & 1 deletion pt-client-2/pt_service_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ EDGE_LOCAL int pt_receive_manifest_vendor_class(json_t *request, json_t *json_pa
{
(void) request;
struct json_message_t *jt = (struct json_message_t*) userdata;
tr_debug("Recieve manifest class and vendor value to protocol translator.");
tr_debug("Receive manifest class and vendor value to protocol translator.");
int status = 0;

if (!check_request_id(jt, result) != 0) {
Expand Down
2 changes: 1 addition & 1 deletion test/pt-client/test_pt_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@ TEST(pt_api, test_add_resource_callback_for_write)
.withPointerParameter("userdata", NULL);
/*
* Check manually that the set callbacks are callable.
* The current responsibilty to call the callbacks are in the
* The current responsibility to call the callbacks are in the
* customer implementation of `received_write_callback`
*/
resource->callback(resource, (uint8_t*) &value, 0, NULL);
Expand Down
2 changes: 1 addition & 1 deletion test/test-lib/mock_rpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ int rpc_write_func_mock(struct connection *connection, char *data, size_t size)
.withParameter("connection", connection)
.withParameter("data", data)
.withParameter("size", size);
// This mocks the data writing to ouput socket
// This mocks the data writing to output socket
// must free the data here.
free(data);
return 0;
Expand Down

0 comments on commit 5ec8687

Please sign in to comment.