Skip to content

Commit 50dd763

Browse files
Docs: add coding standard documentation (#1131)
Add simple coding standard documentation that can serve as preqursor for all future coding quality knowledge hub. --------- Co-authored-by: Marek Kasiewicz <[email protected]>
1 parent 44c0893 commit 50dd763

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

doc/coding_standard.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Coding standard guideline
2+
3+
## Commit messages
4+
For Mtl commit messages generally follows Conventional Commit messages rules
5+
For more details on the Conventional Commit messages rules, refer to the
6+
[Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/).
7+
8+
The only deviations are that structural elements (like Add or Fix) should be capitalized,
9+
and we also allow `add` as an replacement for feat and `build(deps)` for CiCd dependencies bumps.
10+
11+
- `Build`: Changes that affect the build tool or external dependencies (example scopes: gulp, broccoli, - npm)
12+
- `Ci`: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, - Sauce Labs)
13+
- `Docs`: Documentation only changes
14+
- `Feat` / `Add`: A new feature
15+
- `Fix`: A bugfix
16+
- `Perf`: A code change that improves performance
17+
- `Refactor`: A code change that neither fixes a bug nor adds a feature
18+
- `Style`: Changes that do not affect the meaning of the code (whitespace, formatting, missing - semi-colons, etc)
19+
- `Test`: Adding missing tests or correcting existing tests
20+
21+
22+
## Coding standard
23+
24+
The coding standard for the Media Transport Library project is defined using a [.clang-format configuration file](./.clang-format)
25+
which ensures consistent code formatting across the project.
26+
27+
Use `format-code.sh` script to format the code for mtl repository ( requires `clang-format-14` ).
28+
```bash
29+
./format-code.sh
30+
```

0 commit comments

Comments
 (0)