clang-format: add check-format workflow, update CONTRIBUTING.md
PATCH 1/1 clang-format: add check-format workflow, update CONTRIBUTING.md
--- .github/workflows/check-format.yml | 13 +++++++++++++ CONTRIBUTING.md | 5 +++-- 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/check-format.yml
.github/workflows/check-format.yml new file +13 -0
@@ -0,0 +1,13 @@ +name: Check format + +on: [push, pull_request] + +jobs: + clang-format: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: check + run: make check-format
CONTRIBUTING.md +3 -2
@@ -53,8 +53,9 @@ When preparing patches, please follow these guidelines: - Separate large patches into logical patches - Patch descriptions must end with your "Signed-off-by" line. This means your code meets the Developer's certificate of origin, see below. -- C code should be formatted using clang-format, using the .clang-format - configuration file at the root of this repository. +- C code should be formatted with clang-format, using the .clang-format + configuration file at the root of this repository. The targets `format` and + `check-format` are provided by the top-level Makefile for convenience. When adding new, large features or tools it is best to discuss the design on the mailing list prior to submitting the patch.
Signature · 1 line
2.51.0
Oct 25, 2025 10:39:40 Rahul Sandhu <[email protected]>:
Quoted 13 lines
Signed-off-by Rahul Sandhu <[email protected]>---
.github/workflows/check-format.yml| 13 +++++++++++++ CONTRIBUTING.md | 5 +++--2 files changed, 16 insertions(+), 2 deletions(-)create mode 100644
.github/workflows/check-format.yml.github/workflows/check-format.yml new file +0
-0
.github/workflows/check-format.yml line 10
Quoted 10 lines
.github/workflows/check-format.yml new file +10
-0@@ -0,0 +1,13 @@ +name: Check format + +on: [push, pull_request] + +jobs: + clang-format: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4
Latest is v5
Quoted 21 lines
.github/workflows/check-format.yml new file +3
-0+ + - name: check + run: make check-formatCONTRIBUTING.md +0
-2@@ -53,8 +53,9 @@ When preparing patches, please follow these guidelines: - Separate large patches into logical patches - Patch descriptions must end with your "Signed-off-by" line. This means yourcode meets the Developer's certificate of origin, see below. -- C code should be formatted using clang-format, using the .clang-format - configuration file at the root of this repository.
+- C code should be formatted with clang-format, using the .clang-format + configuration file at the root of this repository. The targetsformatand +check-formatare provided by the top-levelMakefilefor convenience.When adding new, large features or tools it is best to discuss the design on the mailing list prior to submitting the patch. --
2.51.0
PATCH v2 1/1 clang-format: add check-format workflow, update CONTRIBUTING.md
--- .github/workflows/check-format.yml | 13 +++++++++++++ CONTRIBUTING.md | 5 +++-- 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/check-format.yml
v2: bump actions/checkout to v5
.github/workflows/check-format.yml new file +13 -0
@@ -0,0 +1,13 @@ +name: Check format + +on: [push, pull_request] + +jobs: + clang-format: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v5 + + - name: check + run: make check-format
CONTRIBUTING.md +3 -2
@@ -53,8 +53,9 @@ When preparing patches, please follow these guidelines: - Separate large patches into logical patches - Patch descriptions must end with your "Signed-off-by" line. This means your code meets the Developer's certificate of origin, see below. -- C code should be formatted using clang-format, using the .clang-format - configuration file at the root of this repository. +- C code should be formatted with clang-format, using the .clang-format + configuration file at the root of this repository. The targets `format` and + `check-format` are provided by the top-level Makefile for convenience. When adding new, large features or tools it is best to discuss the design on the mailing list prior to submitting the patch.
Signature · 1 line
2.51.0
Quoted 2 lines · Rahul Sandhu
Signed-off-by Rahul Sandhu <[email protected]>
Will defer merging until after make format is applied.
Quoted 47 lines
--- .github/workflows/check-format.yml | 13 +++++++++++++ CONTRIBUTING.md | 5 +++-- 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/check-format.ymlv2: bump actions/checkout to v5
.github/workflows/check-format.yml new file +13
-0@@ -0,0 +1,13 @@ +name: Check format + +on: [push, pull_request] + +jobs: + clang-format: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v5 + + - name: check + run: make check-formatCONTRIBUTING.md +3
-3@@ -53,8 +53,9 @@ When preparing patches, please follow these guidelines: - Separate large patches into logical patches - Patch descriptions must end with your "Signed-off-by" line. This means your code meets the Developer's certificate of origin, see below. -- C code should be formatted using clang-format, using the .clang-format - configuration file at the root of this repository. +- C code should be formatted with clang-format, using the .clang-format + configuration file at the root of this repository. The targets `format` and + `check-format` are provided by the top-level Makefile for convenience. When adding new, large features or tools it is best to discuss the design on the mailing list prior to submitting the patch. --2.51.0
Stephen Smalley
maintainerQuoted 20 lines · Christian Göttsche
Oct 25, 2025 10:39:40 Rahul Sandhu <[email protected]>:
Quoted 17 lines
Signed-off-by Rahul Sandhu <[email protected]>---
.github/workflows/check-format.yml| 13 +++++++++++++
CONTRIBUTING.md | 5 +++--2 files changed, 16 insertions(+), 2 deletions(-)create mode 100644
.github/workflows/check-format.yml.github/workflows/check-format.yml new file +4
-0@@ -0,0 +1,13 @@ +name: Check format + +on: [push, pull_request] +
Quoted 8 lines
.github/workflows/check-format.yml line 10
Quoted 6 lines
.github/workflows/check-format.yml new file +6
-0+jobs: + clang-format: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4Latest is v5
Pardon my ignorance, but I see that we are using actions/checkoutv4 in run_tests.yml from which this was likely cut-and-pasted. Do we care?