ngnrsaa / qflex

Flexible Quantum Circuit Simulator (qFlex) implements an efficient tensor network, CPU-based simulator of large quantum circuits.
Apache License 2.0
97 stars 25 forks source link

enforce C++ style guide using clang tools #1

Closed dlyongemallo closed 5 years ago

dlyongemallo commented 5 years ago

The code should follow a major open source C++ style guide. The most obvious one would be Google's, unless there are good reasons to use another one?

We should use clang-tidy to automatically lint any new code which is submitted.

dlyongemallo commented 5 years ago

There's a bunch of places where that's inappropriate because 2-D data structures are visually laid out. Those can be exempted from clang-tidy. But also, maybe they should be represented in data rather than in code.

95-martin-orion commented 5 years ago

As of #28 this is resolved for the cpp_only branch; future CLs should run clang-tidy on modified files prior to submit.

95-martin-orion commented 5 years ago

48 provides a script for this and integrates it with Travis CI. Since CI is still not enabled, for now developers will need to run check_format.sh (and any commands it recommends) before merging PRs.