You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please could we adopt clang-format in the project? If you're unfamiliar with it, it automatically applies some code formatting rules, specified in a file named '.clang-format' in the project root. Lots of editors have built-in support. I'm attaching a rules file that I use in one of my own projects as an example (it'll need to be renamed).
Readability helps a lot with working on a large codebase, and consistency in formatting really makes a difference. I have a little shell script with a 'find' recipe to run it against all my source files (I also invoke dos2unix at the same time).
Advantages:
Consistency and improved readability of the source tree,
It's easy for people who dislike the project's .clang-format to substitute their own, reformat, edit, debug, etc, then reformat to the project style before committing the changes. It's a real headache otherwise, especially when you've already used it to make browsing through the code easier.
Disadvantages:
There is a single, large diff when formatting is applied the first time.
Please could we adopt clang-format in the project? If you're unfamiliar with it, it automatically applies some code formatting rules, specified in a file named '.clang-format' in the project root. Lots of editors have built-in support. I'm attaching a rules file that I use in one of my own projects as an example (it'll need to be renamed).
Readability helps a lot with working on a large codebase, and consistency in formatting really makes a difference. I have a little shell script with a 'find' recipe to run it against all my source files (I also invoke dos2unix at the same time).
Advantages:
Disadvantages:
clang-format.txt
The text was updated successfully, but these errors were encountered: