Skip to content

Commit

Permalink
RHEL-65784: Update code style section in contributing.md
Browse files Browse the repository at this point in the history
Jira: https://issues.redhat.com/browse/RHEL-65784

Signed-off-by: Konstantin Kostiuk <[email protected]>
  • Loading branch information
kostyanf14 committed Nov 21, 2024
1 parent e6546dc commit a152ec8
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ We use GitHub issues to track public bugs. Report a bug by [opening a new issue]

- A quick summary and/or background
- Steps to reproduce
  - Be specific!
  - Give sample code if you can.
- Be specific!
- Give sample code if you can.
- Driver version or commit hash that was used to build the driver
- QEMU command line
- What you expected would happen
Expand All @@ -45,7 +45,28 @@ We use GitHub issues to track public bugs. Report a bug by [opening a new issue]
People *love* thorough bug reports.

## Use a Consistent Coding Style
* 4 spaces for indentation rather than tabs

* We use clang-format tool to check code style.
* In project we have two different code style:
- Style config file for Windows driver /.clang-format
- Style config file for VirtIO library /VirtIO/.clang-format
* To run code style check locally on Linux or Windows (with MSYS or cygwin) use `Tools/clang-format-helper.sh` helper
- on Linux helper uses `clang-format` from PATH
- on Windows helper uses `clang-format` from EWDK 24H2
- CLI:
- For Windows drivers
```bash
bash Tools/clang-format-helper.sh '.' '' './VirtIO'
```
- For VirtIO library
```bash
bash Tools/clang-format-helper.sh 'VirtIO' '' ''
```
* **NOTE**

On Windows clang-format reports problem with several files but changes that needs to be done are not detected by git.

We are investigating this issue.

## HCK\HLK tests
* The contributions should pass Microsoft certification tests. We are running CI to check that the changes in the pull request can pass. If you submit a lot of PRs, you can setup AutoHCK on your premises to test your code changes: [auto-hck setup](https://github.com/HCK-CI/HCK-CI-DOCS/blob/master/installing-hck-ci-from-scratch.txt)
Expand Down

0 comments on commit a152ec8

Please sign in to comment.