electro-smith / DaisySP

A Powerful DSP Library in C++
https://www.electro-smith.com/daisy
Other
866 stars 138 forks source link

add .clang-format file for automatic code formatting #31

Closed TheSlowGrowth closed 4 years ago

TheSlowGrowth commented 4 years ago

To help enforce the coding style, it could be helpful to add a .clang-format file at the repository root. In Visual Studio, a simple keycombination can then be used to directly reformat portions of code - or an entire file.

Extending on this: Pull request can be tied to an automatic formatting check supplied by clang-format. I can help with that.

stephenhensley commented 4 years ago

oh -- we actually use a clang-format file. I thought it was in this repo, but I think its in the DaisyExamples repo and I hadn't noticed.

stephenhensley commented 4 years ago

@TheSlowGrowth I was hoping to start setting up some CI and style checking via pull requests this weekend. I'll open an issue for us to track that separately from here.

I really like the idea of checking style at the PR stage. As that cuts out a large amount of (valuable) review time.