Skip to content

Add cmake-format check to CI #14841

@rwalton-arm

Description

@rwalton-arm

Description of defect

Currently the formatting style we follow for CMake files is ambiguous. We have various indentation rules we seem to require but they are only enforced in manual code review, and suggestions given aren't always consistent.

We can use the cmake-format tool to automatically format CMake files. We should add a check to the CI, using this tool, to enforce a consistent formatting style on PRs that touch CMake files.

Target(s) affected by this defect ?

N/A

Toolchain(s) (name and version) displaying this defect ?

N/A

What version of Mbed-os are you using (tag or sha) ?

master

What version(s) of tools are you using. List all that apply (E.g. mbed-cli)

N/A

How is this defect reproduced ?

Raise a PR with CMake changes.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions