Skip to content

Code auto format config file - #62

Merged
RomanAlexandroff merged 3 commits into
mainfrom
code_auto-format_config_file
Aug 24, 2026
Merged

RomanAlexandroff merged 3 commits into
mainfrom
code_auto-format_config_file

Conversation

@RomanAlexandroff

@RomanAlexandroff RomanAlexandroff commented Aug 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add a repository-root .clang-format derived from Arduino IDE 2’s default ClangFormat configuration and tuned toward The Norm Version 3 formatting where ClangFormat supports it.
  • Keep ft_ / FT_ prefix rules explicitly out of scope for this project.
  • Refactor project tooling so the root Makefile stays a user-facing entrypoint, while Firmware Release Manager internals now live under tools/firmware_release_manager/.
  • Extract the Firmware Release Manager’s embedded Python into documented scripts for preflight checks, release metadata handling and OTA manifest updates for better maintainability.
  • Ignore generated Python bytecode so local verification artifacts are not committed.

Norm / ClangFormat Gaps

ClangFormat cannot enforce every Norm rule. These still require manual review or a dedicated linter:

  • Naming rules such as s_, t_, u_, e_, g_, snake_case, and English identifiers.
  • return (value); parentheses.
  • Tab between return type and function name.
  • Function size, variable count, parameter count, and file-level function count limits.
  • Declaration placement rules and ban on declaration-with-initialization.
  • Forbidden constructs such as for, do while, switch, case, goto, ternary operators, and VLAs.
  • 42 header content/updating and comment placement rules.
  • Header guard naming patterns.

Test Plan

  • python3 -m py_compile tools/firmware_release_manager/*.py
  • make help
  • make -C tools/firmware_release_manager help
  • make -n release
  • make -n publish-manifest
  • make -n format all

RomanAlexandroff and others added 3 commits August 18, 2026 11:21
Move release internals out of the root Makefile so future tools can live under tools/ while preserving the existing user-facing commands.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep release manager verification artifacts out of version control.

Co-authored-by: Cursor <cursoragent@cursor.com>

@RomanAlexandroff RomanAlexandroff left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

No blocking issues found.

The branch cleanly adds the root .clang-format and separates Firmware Release Manager internals from the root Makefile, making the root file a much smaller command dispatcher. The Python extraction keeps the original release and manifest behavior while making the logic easier to read and maintain.

Verified with Python compilation and Makefile dry-runs; no actual firmware release or manifest publish was executed.

@RomanAlexandroff
RomanAlexandroff merged commit 4884b13 into main Aug 24, 2026
3 of 4 checks passed
@RomanAlexandroff
RomanAlexandroff deleted the code_auto-format_config_file branch August 24, 2026 10:10
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.

1 participant