Skip to content

Add code-formatting hook #135

@ensonic

Description

@ensonic

To ensure a consistent code formatting I would add a .clang-format config to git and also apply this once. I'd also add a pre-submit hook and will see if I can figure a github-action to verify it.

The config I am currently testing is based on:
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/340#note_2137606

simply put that into a .clang-format file in the repo-root and run e.g. clang-format -i ./src/lib/core/sequence.c and then meld ./src/lib/core/sequence.c (or git diff).

In the past I used gst-indent but given the woes in the above thread, switching to clang-format might be a better move.

This will likely cause conflicts for pending work, so we should coordinate the timing. It is by no means urgent.

@dlbeswick FYI, wrt. to gtk-4 branch.

Any thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions