Choose code formatting style and add clang-format configuration file
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 167
- Forks
- 31
- PR merge metrics
- No merged PRs in 30d
Description
PR #235 adds a .clang-format file to the repository. It implements a suggested clang-format code style, and points out that the repository would benefit from choosing some code style. This leads to the question of what code style to use.
For a reference implementation of a WG21 proposal, I would prefer to use a style that permits copy-and-paste of code directly into the proposal. However, I did not find a .clang-format template for the WG21 code style. One suggestion was to use the "whatstyle" tool (https://github.com/mikr/whatstyle) on samples of C++ Standard code to deduce clang-format options.
Kokkos' .clang-format was written for clang 8. In my experience, clang-format for clang < 13 does poorly with C++20 code, in particular code that uses concepts. However, the reference implementation of P1673 currently works with C++17 and aims for the same language version requirements as the reference mdspan (P0009) implementation.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing PR #235 and its proposed .clang-format file. Compare the repository's C++17 requirements with the suggested WG21 style, and investigate whatstyle using samples of C++ Standard code. Done means the project has agreed on a code style and a committed .clang-format configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100