WebAssembly / WebAssembly/wabt
C++ coding style is not documented
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 8.1k
- Forks
- 827
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 18
Description
Ran into this issue when reviewing some recent additions.
Currently the only documentation I could find was that we specify BasedOnStyle: Chromium in .clang-format. This implicitly locks down a lot of things which good, more explicit docs would be good.
The specific issue we ran into was the wabt uses a style that requires curly braces around conditional blocks, but chromium, which inherits from google style allows from single line conditional, and conditional without curlys:
https://google.github.io/styleguide/cppguide.html#Conditionals
In general, curly braces are not required for single-line statements
We should be specific if we want to enforce this style.
Contributor guide
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 with the repository's .clang-format and compare its BasedOnStyle: Chromium setting with the linked Chromium C++ style guidance. Document the intended C++ style, including the conditional-brace rule raised in the issue, and consider other implicit choices that should be explicit. Done means contributors and reviewers can find and apply the documented conventions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100