Run clang-format and enable CI check for it (#755)

* pre-commit: Update and enable clang-format check

There is newer version from clang-format so use that. We do not yet want
18 as that is little bit too new.

* Format some thing by hand which clang-format "breaks"

Clang-format will format some things little bit off in some cases.
Format some things by hand so we get cleaner end result.

* Run clang-format with

```
pre-commit run --all-files clang-format
```

We have already in previously checked places where clang-format does not
make good format and ignored those (hopefully most of the things).

---------

Co-authored-by: Kari Argillander <kari.argillander@fidelix.com>
This commit is contained in:
Kari Argillander
2024-08-30 19:20:58 +03:00
committed by GitHub
parent 622a9e609e
commit f806c5829b
547 changed files with 18286 additions and 16575 deletions
+6 -6
View File
@@ -59,7 +59,8 @@ int Structured_View_Read_Property(BACNET_READ_PROPERTY_DATA *rpdata);
BACNET_STACK_EXPORT
const char *Structured_View_Description(uint32_t object_instance);
BACNET_STACK_EXPORT
bool Structured_View_Description_Set(uint32_t object_instance, const char *new_name);
bool Structured_View_Description_Set(
uint32_t object_instance, const char *new_name);
BACNET_STACK_EXPORT
BACNET_NODE_TYPE Structured_View_Node_Type(uint32_t object_instance);
@@ -70,7 +71,8 @@ bool Structured_View_Node_Type_Set(
BACNET_STACK_EXPORT
const char *Structured_View_Node_Subtype(uint32_t object_instance);
BACNET_STACK_EXPORT
bool Structured_View_Node_Subtype_Set(uint32_t object_instance, const char *new_name);
bool Structured_View_Node_Subtype_Set(
uint32_t object_instance, const char *new_name);
BACNET_STACK_EXPORT
BACNET_SUBORDINATE_DATA *
@@ -79,8 +81,7 @@ BACNET_STACK_EXPORT
void Structured_View_Subordinate_List_Set(
uint32_t object_instance, BACNET_SUBORDINATE_DATA *subordinate_list);
BACNET_STACK_EXPORT
BACNET_SUBORDINATE_DATA *
Structured_View_Subordinate_List_Member(
BACNET_SUBORDINATE_DATA *Structured_View_Subordinate_List_Member(
uint32_t object_instance, BACNET_ARRAY_INDEX array_index);
BACNET_STACK_EXPORT
unsigned int Structured_View_Subordinate_List_Count(uint32_t object_instance);
@@ -110,8 +111,7 @@ BACNET_DEVICE_OBJECT_REFERENCE *
Structured_View_Represents(uint32_t object_instance);
BACNET_STACK_EXPORT
bool Structured_View_Represents_Set(
uint32_t object_instance,
const BACNET_DEVICE_OBJECT_REFERENCE *represents);
uint32_t object_instance, const BACNET_DEVICE_OBJECT_REFERENCE *represents);
BACNET_STACK_EXPORT
uint32_t Structured_View_Create(uint32_t object_instance);