Skip to content

Commit

Permalink
Updated formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanplusplus committed Dec 17, 2023
1 parent df2be9e commit a482d68
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 25 deletions.
10 changes: 4 additions & 6 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,10 @@ ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: false
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
- Regex: '^<'
Priority: -2
- Regex: '.*'
Priority: 1
Priority: -1
IncludeIsMainRegex: '(Test)?$'
IndentCaseLabels: true
IndentPPDirectives: None
Expand All @@ -84,7 +82,7 @@ PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Left
ReflowComments: true
SortIncludes: false
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
Expand Down
2 changes: 1 addition & 1 deletion include/i_tiny_comm.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#ifndef i_tiny_comm_h
#define i_tiny_comm_h

#include <stdint.h>
#include <stdbool.h>
#include <stdint.h>
#include "i_tiny_event.h"

typedef struct {
Expand Down
2 changes: 1 addition & 1 deletion include/i_tiny_key_value_store.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#ifndef i_tiny_key_value_store_h
#define i_tiny_key_value_store_h

#include <stdint.h>
#include <stdbool.h>
#include <stdint.h>
#include "i_tiny_event.h"

typedef uint8_t tiny_key_value_store_key_t;
Expand Down
2 changes: 1 addition & 1 deletion include/tiny_comm.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
#ifndef tiny_comm_h
#define tiny_comm_h

#include "i_tiny_comm.h"
#include "hal/i_tiny_uart.h"
#include "i_tiny_comm.h"
#include "tiny_event.h"

typedef struct {
Expand Down
2 changes: 1 addition & 1 deletion include/tiny_event_queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
#ifndef tiny_event_queue_h
#define tiny_event_queue_h

#include <stddef.h>
#include <stdbool.h>
#include <stddef.h>
#include "i_tiny_event_queue.h"
#include "tiny_ring_buffer.h"

Expand Down
2 changes: 1 addition & 1 deletion include/tiny_fsm.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
#ifndef tiny_fsm_h
#define tiny_fsm_h

#include <stdint.h>
#include <stddef.h>
#include <stdint.h>

enum {
tiny_fsm_signal_entry,
Expand Down
2 changes: 1 addition & 1 deletion include/tiny_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
#ifndef tiny_list_h
#define tiny_list_h

#include <stddef.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>

typedef struct tiny_list_node_t {
Expand Down
2 changes: 1 addition & 1 deletion include/tiny_ram_key_value_store.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
#define tiny_ram_key_value_store_h

#include "i_tiny_key_value_store.h"
#include "tiny_ram_key_value_store_macros.h"
#include "tiny_event.h"
#include "tiny_ram_key_value_store_macros.h"

typedef struct {
uint16_t value_offset;
Expand Down
2 changes: 1 addition & 1 deletion include/tiny_ram_key_value_store_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
#ifndef tiny_ram_key_value_store_macros_h
#define tiny_ram_key_value_store_macros_h

#include <stdint.h>
#include <stddef.h>
#include <stdint.h>

#define ram_key_value_pairs_expand_as_enumeration(_key, value_type) _key,

Expand Down
2 changes: 1 addition & 1 deletion include/tiny_timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#ifndef tiny_timer_h
#define tiny_timer_h

#include <stdint.h>
#include <stdbool.h>
#include <stdint.h>
#include "i_tiny_time_source.h"
#include "tiny_list.h"

Expand Down
2 changes: 1 addition & 1 deletion src/tiny_ram_key_value_store.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* @brief
*/

#include <string.h>
#include <stddef.h>
#include <string.h>
#include "tiny_ram_key_value_store.h"
#include "tiny_utils.h"

Expand Down
2 changes: 1 addition & 1 deletion src/tiny_ring_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
* - remove must write to the tail pointer after copying the element
*/

#include <string.h>
#include <stdint.h>
#include <string.h>
#include "tiny_ring_buffer.h"

static inline unsigned increment_with_wrap(unsigned x, unsigned limit)
Expand Down
14 changes: 7 additions & 7 deletions src/tiny_stack_allocator.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* @brief
*/

#include <stdint.h>
#include <stddef.h>
#include <stdint.h>
#include "tiny_stack_allocator.h"
#include "tiny_utils.h"

Expand Down Expand Up @@ -32,12 +32,12 @@ typedef struct
} worker_t;

static const worker_t workers[] = {
{8, worker_8},
{16, worker_16},
{32, worker_32},
{64, worker_64},
{128, worker_128},
{256, worker_256},
{ 8, worker_8 },
{ 16, worker_16 },
{ 32, worker_32 },
{ 64, worker_64 },
{ 128, worker_128 },
{ 256, worker_256 },
};

void tiny_stack_allocator_allocate_aligned(
Expand Down
2 changes: 1 addition & 1 deletion test/src/tiny_uart_double.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* @brief
*/

#include "double/tiny_uart_double.h"
#include "CppUTestExt/MockSupport.h"
#include "double/tiny_uart_double.h"
#include "tiny_utils.h"

static void send(i_tiny_uart_t* _self, uint8_t byte)
Expand Down

0 comments on commit a482d68

Please sign in to comment.