From 8bd7e1d45b07fb8089b09bc2206a8929357dec12 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Sun, 17 Oct 2021 00:02:39 +0100 Subject: docs: Mention clang-format Contributors should use clang-format to ensure that their code fits in with the rest of the code base. --- CONTRIBUTING.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'CONTRIBUTING.md') diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fa7768d..44c6b64 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -132,6 +132,23 @@ Typically, you should work on your own branch: $ git switch -C your-branch ``` +The coding style of libgweather is maintained through +[clang-format](https://clang.llvm.org/docs/ClangFormat.html). The +configuration is provided by libgweather itself. Before committing your +changes, you should run: + +```sh +clang-format \ + --style=file \ + libgweather/*.c \ + libgweather/tests/*.c \ + libgweather/tools/*.c +``` + +to ensure that the changes are formatted using the same coding style as the +rest of the project. The project's own continuous integration pipeline will +enforce the coding style. + Once you’ve finished working on the bug fix or feature, push the branch to the Git repository and open a new merge request, to let the libgweather core developers review your contribution. @@ -264,6 +281,6 @@ There are a number of requirements for those tokens: - One should be provided in the patch for testing purposes, and be easily overridable by distributions wishing to have a separate identifier and limits - The test token should have high enough limits that you're reasonably confident - that lots of people running `make check` won’t cause the token to be revoked + that lots of people running `meson test` won’t cause the token to be revoked and break everyone’s tests - Instructions on how to get a token for the application must be provided -- cgit v1.2.1