diff options
author | NRK <nrk@disroot.org> | 2023-02-10 06:51:53 +0100 |
---|---|---|
committer | NRK <nrk@disroot.org> | 2023-03-11 13:37:08 +0100 |
commit | 157646f54cd010c8c884998319954006260f960e (patch) | |
tree | 1cd91dbbd707179084044b1e0a96225258aa73d9 /etc/CONTRIBUTING.md | |
parent | f2f4903de4bd3ce06c03dd66f0c9a7dda97a3550 (diff) | |
download | nsxiv-157646f54cd010c8c884998319954006260f960e.tar.zst |
etc changes related to code-style docs
* Add a "Code Style" section in CONTRIBUTING
* Move .clang-format to etc/
* Add a short comment on clang-format and editorconfig file
Diffstat (limited to 'etc/CONTRIBUTING.md')
-rw-r--r-- | etc/CONTRIBUTING.md | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/etc/CONTRIBUTING.md b/etc/CONTRIBUTING.md index 8d9680f..aa96068 100644 --- a/etc/CONTRIBUTING.md +++ b/etc/CONTRIBUTING.md @@ -23,7 +23,7 @@ Contribution Guideline When contributing, make sure: * Your contribution falls under nsxiv's scope and aim - * You follow the existing code style (see [.editorconfig](../.editorconfig)) + * You follow the existing code style (see the "Code Style" section below) * You open the pull request from a new branch, not from master * To avoid using force pushes, especially for bigger patches. Only use them when there's merge conflicts. @@ -44,6 +44,21 @@ to work on. You can also filter the issues via label: (Intermediate/Experienced) Issues where we require some help. +Code Style +---------- + +`nsxiv` mostly follows the [suckless code-style][sl], with a few exceptions. +If your editor supports [.editorconfig](../.editorconfig) then you'll already be +off to a good start without needing much manual intervention. Additionally we +provide a [clang-format](./.clang-format) configuration for reference, which you +may use via [`git-clang-format`][cf] to format the changes you've made (please +do not run it globally on the entire code-base since clang-format gets a decent +amount of edge cases wrong). + +[sl]: https://suckless.org/coding_style/ +[cf]: https://clang.llvm.org/docs/ClangFormat.html#git-integration + + Development workflow for maintainers ------------------------------------ |