Skip to content

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
mainfrom
punch/cicd_warnings_as_errors
Open

Add CI/CD test for formatting and make errors on warnings for existing build test#44
miles-p wants to merge 7 commits into
mainfrom
punch/cicd_warnings_as_errors

Conversation

@miles-p

@miles-p miles-p commented Aug 5, 2026

Copy link
Copy Markdown
Contributor
  1. Formatting test like on NUbots/NUbots
  2. Errors on warnings on our existing CI pipeline (I was the biggest culprit of getting crappy warning-ridden code to main)
  3. Makes the codebase pass the CI/CD checks by formatting the entire thing to our .clang-format

:)

@miles-p
miles-p requested review from vincenttumminello and a lite review from Copilot and removed request for Copilot August 5, 2026 00:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-latest can change underneath you, but this workflow relies on a specific clang-format-18 package/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.

Comment thread .github/workflows/format.yml Outdated
Comment thread .github/workflows/build.yml
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants