Skip to content

Conversation

@ZZ-Cat
Copy link
Owner

@ZZ-Cat ZZ-Cat commented Oct 23, 2025

Note

This Pull Request contains 19 Unverified commits from 3144f3e to de24843.
This is because the GPG signature I was using when I was working on CFA from 2025-09-03 to 2025-09-07 has expired and I have since revoked it.
All commits from d3ae855 on 2025-10-24 onward are verified, because I am now using a new GPG signature.

This is also the first Pull Request where I am using GitHub CoPilot as my code reviewer in addition to me reviewing my own code off-site.

Key changes

  • Defect Detector only scans what matters to CFA
    All out-of-scope defects (EG defects in upstream board support packages) are ignored.
  • Arduino.h header is commented out for Teensy and RP2040 targets
    This prevents the Defect Detector from picking up out-of-scope defects on Teensy 4 and RP2040 based development boards and (by extension) failing builds on these targets for out-of-scope defects.
  • Defect Detector now uses clang-tidy as a part of its scanning process
    clang-tidy scans the entirety of CFA for defects.
  • Defect Detector now uses cppcheck in tandem with clang-tidy
    One catches what the other one may miss — IE clang-tidy will scan CFA for medium and high severity defects, and cppcheck will only scan for high severity defects. Everything else is ignored.

What this does

To help with cutting through the noise when building CFA for various targets, I have refactored my Defect Detector script to only pick up on code and build errors that are relevant to CFA.
All out-of-scope defects (usually more relevant to the various upstream repositories CFA relies on for compatibility with your development boards) are ignored.

This means I can focus more on CFA itself and bringing you high quality code instead of bogging myself down with fixing an upstream's coding mistakes.

… RP2040 Connect and Raspberry Pi Pico environments
…3.1, 3.2, 3.5, 3.6, 4.0, and 4.1 environments
This is disabled while I work on re-factoring the C++ Check side of things.
…ality_control.ini

This is where I should have temporarily disabled them in the first place, instead of my `build.py` script. =</.>=
@ZZ-Cat ZZ-Cat requested a review from Copilot October 23, 2025 21:47
@ZZ-Cat ZZ-Cat self-assigned this Oct 23, 2025
@ZZ-Cat ZZ-Cat added the CI/CD 🚧 Continuous Integration/Continuous Deployment label Oct 23, 2025
Copy link

Copilot AI left a comment

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 refactors the quality control process by integrating Clang-Tidy alongside CppCheck for defect detection, and focuses scanning only on CFA-specific code. The defect detector is split into two separate environments (defect_detector_clangtidy and defect_detector_cppcheck) with distinct configurations for complementary code analysis. Build configurations are standardized across all target files to use common build flags and explicitly set release/debug build types.

Key changes:

  • Split defect detection into separate Clang-Tidy and CppCheck environments with targeted suppressions to exclude out-of-scope issues
  • Standardized build configurations across all platform targets (ESP32, RP2040, SAMD21, SAMD51, STM32, Teensy) to use common build flags, unflags, and build types
  • Updated C/C++ standards configuration and optimization levels with renamed sections and added development-specific flags

Reviewed Changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/build/targets/quality_control.ini Split defect detection into separate Clang-Tidy and CppCheck environments with specific configurations
src/build/targets/common.ini Standardized C++ standards, optimization levels, and build flags with new naming conventions
src/build/scripts/build.py Updated to run both Clang-Tidy and CppCheck defect detection sequentially
src/build/scripts/.clang-tidy Added Clang-Tidy configuration file with comprehensive check categories
src/build/targets/unified_*.ini Added explicit build flags, unflags, and build type to all target environments
src/build/scripts/platformio.ini Reorganized directory configurations and commented out legacy sections
src/CFA_Config.hpp Updated version from 2025.9.2 to 2025.10.24
library.properties Updated version number
library.json Updated version number
.devcontainer/devcontainer.json Changed uucp group ID from 986 to 985

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Use relative links in suppressions instead of absolute links.

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Cassandra "ZZ Cat" Robinson <[email protected]>
@ZZ-Cat
Copy link
Owner Author

ZZ-Cat commented Oct 23, 2025

Screenshot_20251024_111351

Yup. I knew that would happen.
I'mma let this Pull Request cook for a wee bit before I decide on what course of action to take next with it.

ZZ-Cat added a commit that referenced this pull request Oct 25, 2025
This introduces the same changes as #160, but with a verified commit. Everything should pass now.
@ZZ-Cat
Copy link
Owner Author

ZZ-Cat commented Oct 25, 2025

I have decided to alias this pull request as #161 due to this Pull Request having unverified commits. Because of that, I am closing this Pull Request and the alias will get merged instead.

@ZZ-Cat ZZ-Cat closed this Oct 25, 2025
@ZZ-Cat ZZ-Cat deleted the refactor-build-environment branch October 25, 2025 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD 🚧 Continuous Integration/Continuous Deployment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant