eufon

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

CONTRIBUTING.md (1341B)


      1 # Contributing Guidelines
      2 
      3 Contributing entails that all contributions follow the [MPL 2.0 license](https://github.com/buffet/kiwmi/blob/master/LICENSE).
      4 
      5 ## Opening Issues
      6 
      7 - Ensure that bugs have proper steps to reproduce
      8 - Include program version, along with any system specs that may help identify the issue
      9 
     10 ## Committing
     11 
     12 Commit messages should be both _clear_ and _descriptive_. If possible, commit titles should start with a verb describing the change. Don't be shy to include additional information such as motivation for the change in the commit body. Be sure to ensure other developers will be able to understand _why_ a specific change has occurred in the future.
     13 
     14 ## Code formatting
     15 
     16 To ensure consistent formatting, use `clang-format -i **/*.[ch]` (beware, not all shells support that glob). Don't worry too much about forgetting to do so, the pipeline will remind you by failing on your commit/PR. You can also make this your pre-commit git hook (see `man 5 githooks`) to avoid committing any misformatted code:
     17 
     18 ```sh
     19 #!/bin/sh
     20 
     21 # Check if there're any formatting errors
     22 find . '(' -name .git -o -path ./build ')' -prune \
     23     -o -type f -name '*.[ch]' -print |
     24   xargs -d '\n' clang-format --dry-run >/dev/null 2>&1
     25 
     26 if [ $? -ne 0 ]; then
     27   echo 'Code formatting is wrong, fix it before commit' >/dev/stderr
     28   exit 1
     29 fi
     30 ```