Skip to content

Use clang-format on code #148

@ksshannon

Description

@ksshannon

I'd like to introduce a requirement for formatting. We can do this automagically using clang-format. Can we agree on a format style? We can write our own, but clang-format has built in formats based on:

It's easiest to just use one of these. I looked at Mozilla, and it looked fine to me. I could care less which one we pick. It is just one less thing we have to think about, and it makes the code predictable.

After one is picked, I'll write a pre-commit hook for git to run it when code is committed, or at least warn when clang-format hasn't been run.

Tasks:

  • Pick a format
  • Write pre-commit hook
  • Add clang-format to dependency scripts and documentation

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions