Issue 10 ci add support for code spelling checks (#231)

* added make targets spell and codespell for spelling checks

* fix spelling errors detected by codespell

* added codespell to github workflow

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
Steve Karg
2022-02-27 16:02:17 -06:00
committed by GitHub
parent b31cb43e22
commit 5e70eeecfc
32 changed files with 79 additions and 58 deletions
+1 -1
View File
@@ -65,7 +65,7 @@ extern "C" {
BACNET_DATE_TIME Event_Time_Stamps[MAX_BACNET_EVENT_TRANSITION];
/* time to generate event notification */
uint32_t Remaining_Time_Delay;
/* AckNotification informations */
/* AckNotification information */
ACK_NOTIFICATION Ack_notify_data;
#endif
} ANALOG_INPUT_DESCR;
+1 -1
View File
@@ -65,7 +65,7 @@ extern "C" {
BACNET_DATE_TIME Event_Time_Stamps[MAX_BACNET_EVENT_TRANSITION];
/* time to generate event notification */
uint32_t Remaining_Time_Delay;
/* AckNotification informations */
/* AckNotification information */
ACK_NOTIFICATION Ack_notify_data;
#endif
} ANALOG_VALUE_DESCR;
+2 -2
View File
@@ -682,7 +682,7 @@ int Command_Read_Property(BACNET_READ_PROPERTY_DATA *rpdata)
for (i = 0; i < MAX_COMMAND_ACTIONS; i++) {
BACNET_ACTION_LIST *Curr_CL_Member =
&CurrentCommand->Action[0];
/* another loop, for aditional actions in the list */
/* another loop, for additional actions in the list */
for (; Curr_CL_Member != NULL;
Curr_CL_Member = Curr_CL_Member->next) {
len = cl_encode_apdu(
@@ -703,7 +703,7 @@ int Command_Read_Property(BACNET_READ_PROPERTY_DATA *rpdata)
if (rpdata->array_index < MAX_COMMAND_ACTIONS) {
BACNET_ACTION_LIST *Curr_CL_Member =
&CurrentCommand->Action[rpdata->array_index];
/* another loop, for aditional actions in the list */
/* another loop, for additional actions in the list */
for (; Curr_CL_Member != NULL;
Curr_CL_Member = Curr_CL_Member->next) {
len = cl_encode_apdu(
+1 -1
View File
@@ -91,7 +91,7 @@ typedef bool(
/** Helper function to step through an array of objects and find either the
* first one or the next one of a given type. Used to step through an array
* of objects which is not necessarily contiguious for each type i.e. the
* of objects which is not necessarily contiguous for each type i.e. the
* index for the 'n'th object of a given type is not necessarily 'n'.
* @ingroup ObjHelpers
* @param [in] The index of the current object or a value of ~0 to indicate
+1 -1
View File
@@ -59,7 +59,7 @@
#if defined(BACFILE)
#include "bacnet/basic/object/bacfile.h" /* object list dependency */
#endif
/* os specfic includes */
/* os specific includes */
#include "bacnet/basic/sys/mstimer.h"
/* local forward and external prototypes */
+4 -4
View File
@@ -867,8 +867,8 @@ bool Load_Control_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data)
unsigned int object_index = 0;
int len = 0;
BACNET_APPLICATION_DATA_VALUE value;
BACNET_DATE
TempDate; /* build here in case of error in time half of datetime */
/* build here in case of error in time half of datetime */
BACNET_DATE start_date;
PRINTF("Load_Control_Write_Property(wp_data=%p)\n", wp_data);
if (wp_data == NULL) {
@@ -954,7 +954,7 @@ bool Load_Control_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data)
break;
}
/* Hold the date until we are sure the time is also there */
TempDate = value.type.Date;
start_date = value.type.Date;
len =
bacapp_decode_application_data(wp_data->application_data + len,
wp_data->application_data_len - len, &value);
@@ -963,7 +963,7 @@ bool Load_Control_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data)
BACNET_APPLICATION_TAG_TIME);
if (status) {
/* Write time and date and set written flag */
Start_Time[object_index].date = TempDate;
Start_Time[object_index].date = start_date;
Start_Time[object_index].time = value.type.Time;
Start_Time_Property_Written[object_index] = true;
}
+1 -1
View File
@@ -74,7 +74,7 @@ void Schedule_Init(void)
SCHEDULE_DESCR *psched = &Schedule_Descr[0];
for (i = 0; i < MAX_SCHEDULES; i++, psched++) {
/* whole year, change as neccessary */
/* whole year, change as necessary */
psched->Start_Date.year = 0xFF;
psched->Start_Date.month = 1;
psched->Start_Date.day = 1;
+10 -11
View File
@@ -231,7 +231,7 @@ void Trend_Log_Init(void)
/*
* Note: we use the instance number here and build the name based
* on the assumption that there is a 1 to 1 correspondance. If there
* on the assumption that there is a 1 to 1 correspondence. If there
* is not we need to convert to index before proceeding.
*/
bool Trend_Log_Object_Name(
@@ -419,8 +419,7 @@ bool Trend_Log_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data)
int len = 0;
BACNET_APPLICATION_DATA_VALUE value;
TL_LOG_INFO *CurrentLog;
BACNET_DATE
TempDate; /* build here in case of error in time half of datetime */
BACNET_DATE start_date, stop_date;
BACNET_DEVICE_OBJECT_PROPERTY_REFERENCE TempSource;
bool bEffectiveEnable;
int log_index;
@@ -574,7 +573,7 @@ bool Trend_Log_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data)
if (!status) {
break;
}
TempDate = value.type.Date;
start_date = value.type.Date;
/* Then decode the time part */
len =
bacapp_decode_application_data(wp_data->application_data + len,
@@ -588,8 +587,8 @@ bool Trend_Log_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data)
}
/* First record the current enable state of the log */
bEffectiveEnable = TL_Is_Enabled(log_index);
CurrentLog->StartTime.date =
TempDate; /* Safe to copy the date now */
/* Safe to copy the date now */
CurrentLog->StartTime.date = start_date;
CurrentLog->StartTime.time = value.type.Time;
if (datetime_wildcard_present(&CurrentLog->StartTime)) {
@@ -625,7 +624,7 @@ bool Trend_Log_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data)
if (!status) {
break;
}
TempDate = value.type.Date;
stop_date = value.type.Date;
/* Then decode the time part */
len =
bacapp_decode_application_data(wp_data->application_data + len,
@@ -639,8 +638,8 @@ bool Trend_Log_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data)
}
/* First record the current enable state of the log */
bEffectiveEnable = TL_Is_Enabled(log_index);
CurrentLog->StopTime.date =
TempDate; /* Safe to copy the date now */
/* Safe to copy the date now */
CurrentLog->StopTime.date = stop_date;
CurrentLog->StopTime.time = value.type.Time;
if (datetime_wildcard_present(&CurrentLog->StopTime)) {
@@ -988,7 +987,7 @@ void TL_Local_Time_To_BAC(BACNET_DATE_TIME *DestTime, time_t SourceTime)
* *
* We take the simple approach here to filling the buffer by taking a max *
* size for a single entry and then stopping if there is less than that *
* left in the buffer. You could build each entry in a seperate buffer and *
* left in the buffer. You could build each entry in a separate buffer and *
* determine the exact length before copying but this is time consuming, *
* requires more memory and would probably only let you sqeeeze one more *
* entry in on occasion. The value is calculated as 10 bytes for the time *
@@ -1740,7 +1739,7 @@ void trend_log_timer(uint16_t uSeconds)
* and the offset to decide when to log. Also log a reading
* if more than interval time has elapsed since last reading
* to ensure we don't miss a reading if we aren't called at
* the precise second when the match occurrs.
* the precise second when the match occurs.
*/
/* if(((tNow % CurrentLog->ulLogInterval) >=
* (CurrentLog->ulIntervalOffset %
+1 -1
View File
@@ -53,7 +53,7 @@ extern "C" {
/* Storage structure for Trend Log data
*
* Note. I've tried to minimise the storage requirements here
* Note. I've tried to minimize the storage requirements here
* as the memory requirements for logging in embedded
* implementations are frequently a big issue. For PC or
* embedded Linux type setupz this may seem like overkill