Add CI/CD test for formatting and make errors on warnings for existing build test - #44
Open
miles-p wants to merge 7 commits into
Open
Add CI/CD test for formatting and make errors on warnings for existing build test#44miles-p wants to merge 7 commits into
miles-p wants to merge 7 commits into
Conversation
This reverts commit d1fb21f.
miles-p
requested review from
vincenttumminello
and
a lite review from Copilot
and removed request for
Copilot
August 5, 2026 00:01
There was a problem hiding this comment.
Pull request overview
This PR tightens CI enforcement for the NUSense firmware by adding an automated clang-format check and making the existing firmware build fail on compiler warnings (via a dedicated PlatformIO CI environment). It also reformats touched NUSense source files to comply with the repository’s .clang-format.
Changes:
- Add a GitHub Actions workflow to check clang-format compliance in the NUSense codebase.
- Add a stricter PlatformIO environment (
nucleo_h753zi_ci) that enables-Werror, and update the CI build to use it. - Apply formatting-only changes across several NUSense source/header files.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
NUSense/platformio.ini |
Adds a CI PlatformIO env extending the existing one and enabling -Werror. |
NUSense/Core/Src/uart/RS485.h |
Formatting-only adjustments (includes order, spacing, comments). |
NUSense/Core/Src/uart/Port.cpp |
Formatting-only adjustment to a wrapped expression. |
NUSense/Core/Src/nusense/Convert.cpp |
Formatting-only line wrapping for long expressions. |
NUSense/Core/Src/fan_controller.c |
Formatting-only whitespace/brace/indentation cleanup. |
NUSense/Core/Src/device/Pulser.hpp |
Formatting-only whitespace alignment tweaks. |
.github/workflows/format.yml |
Adds clang-format CI workflow. |
.github/workflows/build.yml |
Switches CI build to the stricter PlatformIO env. |
Suppressed comments (1)
.github/workflows/format.yml:11
runs-on: ubuntu-latestcan change underneath you, but this workflow relies on a specificclang-format-18package/binary. Pinning the runner image makes the formatting check more stable over time.
clang-format:
runs-on: ubuntu-latest
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NUbots/NUbots.clang-format:)