From 1fe352092f7084f0a6f10981b5ee6c6051c10a2c Mon Sep 17 00:00:00 2001 From: Nemanja Stojoski Date: Sun, 29 Oct 2023 12:05:03 +0100 Subject: [PATCH] Upgrade to clang-format 17 (#364) --- .clang-format | 1 + .github/workflows/merge-criteria.yml | 2 +- flight_computer/src/cli/cli.cpp | 2 +- flight_computer/src/config/globals.cpp | 2 +- flight_computer/src/control/orientation_filter.cpp | 2 +- ground_station/src/hmi/bmp.hpp | 2 +- ground_station/src/utils.cpp | 2 +- 7 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.clang-format b/.clang-format index e2c0bf0a..76944693 100644 --- a/.clang-format +++ b/.clang-format @@ -179,5 +179,6 @@ WhitespaceSensitiveMacros: - STRINGIZE - PP_STRINGIZE - BOOST_PP_STRINGIZE +InsertNewlineAtEOF: true ... diff --git a/.github/workflows/merge-criteria.yml b/.github/workflows/merge-criteria.yml index 537f3f81..d5b12ff1 100644 --- a/.github/workflows/merge-criteria.yml +++ b/.github/workflows/merge-criteria.yml @@ -63,7 +63,7 @@ jobs: - name: Run clang-format uses: jidicula/clang-format-action@v4.9.0 with: - clang-format-version: '13' + clang-format-version: '17' check-path: '${{ matrix.project }}/src' exclude-regex: '(lib|telemetry/src/st|ground_station/src/format)' diff --git a/flight_computer/src/cli/cli.cpp b/flight_computer/src/cli/cli.cpp index b45ba354..97b1e2da 100644 --- a/flight_computer/src/cli/cli.cpp +++ b/flight_computer/src/cli/cli.cpp @@ -466,4 +466,4 @@ void cli_print_var_range(const cli_value_t *var) { cli_print_linef("Allowed values: OFF, ON"); } break; } -} \ No newline at end of file +} diff --git a/flight_computer/src/config/globals.cpp b/flight_computer/src/config/globals.cpp index 692c78b7..aae8b0b8 100644 --- a/flight_computer/src/config/globals.cpp +++ b/flight_computer/src/config/globals.cpp @@ -41,4 +41,4 @@ volatile recorder_status_e global_recorder_status = REC_OFF; event_action_map_elem_t* event_action_map = nullptr; char telemetry_code_version[20] = {}; -// NOLINTEND(cppcoreguidelines-avoid-non-const-global-variables) \ No newline at end of file +// NOLINTEND(cppcoreguidelines-avoid-non-const-global-variables) diff --git a/flight_computer/src/control/orientation_filter.cpp b/flight_computer/src/control/orientation_filter.cpp index c682bafe..094c648a 100644 --- a/flight_computer/src/control/orientation_filter.cpp +++ b/flight_computer/src/control/orientation_filter.cpp @@ -42,4 +42,4 @@ void quaternion_kinematics(orientation_filter_t* filter, vf32_t angular_vel) { /* Normalize Prediction */ normalize_q(filter->estimate_data); -} \ No newline at end of file +} diff --git a/ground_station/src/hmi/bmp.hpp b/ground_station/src/hmi/bmp.hpp index f3496ab9..a19d18a3 100644 --- a/ground_station/src/hmi/bmp.hpp +++ b/ground_station/src/hmi/bmp.hpp @@ -561,4 +561,4 @@ const unsigned char usb_logo[] PROGMEM = { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; \ No newline at end of file + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/ground_station/src/utils.cpp b/ground_station/src/utils.cpp index 11a28fd4..7c6d0819 100644 --- a/ground_station/src/utils.cpp +++ b/ground_station/src/utils.cpp @@ -296,4 +296,4 @@ DRESULT disk_ioctl(BYTE pdrv, // Physical drive nmuber (0..) return RES_PARERR; } } -} \ No newline at end of file +}