Skip to content

[phase 3] Add .clang-format configuration to enforce consistent code style #663

@aregtech

Description

@aregtech

Important

Refactoring changes should be rebased and merged against this branch:
feature/655-api-modernization-and-refactoring

Summary

Add a .clang-format file to the repository root to enforce consistent formatting across all C++ source files. This should be done after the naming refactoring is complete, so the format reflects the final coding style.

Requirements

The .clang-format should enforce:

  • C++17 standard
  • Consistent brace style (Allman or K&R — to be decided based on current codebase majority)
  • 4-space indentation (matching current code)
  • Column limit (120 or 140, matching existing style)
  • Pointer/reference alignment: const String & name style currently used
  • Include sorting and grouping

Deliverables

  • .clang-format file at repository root
  • .clang-format-ignore if any files should be excluded (e.g., generated code, third-party)
  • Verification: running clang-format on a sample of files produces reasonable output
  • Optional: CI step to check formatting

Depends on

  • All naming convention changes should be finalized first

Acceptance criteria

  • .clang-format committed to repository root
  • Format is consistent with the established code style
  • No formatting conflicts with existing code patterns

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions