From fc5078dbe5728f7db1e222c056111ee72e200a0b Mon Sep 17 00:00:00 2001 From: Tom Atkinson Date: Sat, 24 Feb 2024 16:23:43 +0000 Subject: [PATCH] add contributing docs --- .github/workflows/check.yml | 2 +- CONTRIBUTING.adoc | 24 +++++++++++++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 9f2e21147..011a98a9b 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -98,8 +98,8 @@ jobs: pre-commit: name: Pre-Commit Checks runs-on: ubuntu-latest - continue-on-error: true # we currently don't track pre-commit warnings as errors. in the future this will change. for this step to pass we will need to run `pre-commit run --all-files` steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v3 - uses: pre-commit/action@v3.0.1 + continue-on-error: true # we currently don't track pre-commit warnings as errors. in the future this will change. for this step to pass we will need to run `pre-commit run --all-files` diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc index 26efb531e..d84eeda0f 100644 --- a/CONTRIBUTING.adoc +++ b/CONTRIBUTING.adoc @@ -1,5 +1,5 @@ //// -- Copyright (c) 2019-2023, Arm Limited and Contributors +- Copyright (c) 2019-2024, Arm Limited and Contributors - - SPDX-License-Identifier: Apache-2.0 - @@ -32,6 +32,28 @@ If you have a sample that demonstrates Vulkan like any of the above points, then Before you start, check out the requirements and guidelines below. Following these guidelines can help ensure that your contribution ends up being approved by reviewers and most importantly becomes a valuable addition to the Vulkan Samples repository. +== Quality Checks + +Vulkan Samples has a range of quality checks to ensure that we maintain a consistent quality and style across all samples. These include formatting, linting and copyright checks. + +To make this process as painless for contributors as possible we use xref:https://pre-commit.com/[pre-commit]. To install pre-commit and the hooks for this repository, run the following commands: + +---- +pip install pre-commit +pre-commit install +---- + +If you prefer not to use pre-commit, you can run the checks manually using the following commands: + +---- +# Run clang-format +./scripts/clang_format.py main +# Run copyright checks +./scripts/copyright.py main --fix +---- + +Future tooling may be added in the future. If you have any suggestions or feedback, please open an issue on the repository. + == Repository Structure |===