forked from eclipse-wakaama/wakaama
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[eclipse-wakaamaGH-585] ci: Integrate gitlint
This is a fairly default configuration, which, among other stuff, checks for the subject line being 72 or less characters as required by the Eclipse project handbook. Non-default rules: - Enforce at least 20 characters in the commit body - Disallow the word "fixup" in the title messages. Intended to prevent accidents like d31d026. In case any of those rules get in the way, use the "gitlint-ignore" tag in the commit message to suppress gitlint findings for this specific commit. To configure a rule permanently, adapt .gitlint. The GitHub Action runs only on PRs, not after each push. The idea is to prevent annoyance when working on code, using WIP or other non-compliant commit messages.
- Loading branch information
1 parent
b846bf2
commit cfd75f8
Showing
3 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Compliance | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
check-gitlint: | ||
name: Run gitlint | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- name: Checkout code including full history | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install gitlint | ||
run: | | ||
pip3 install gitlint | ||
- name: Check commits with checkpatch | ||
run: | | ||
git branch -a | ||
tools/ci/run_ci.sh --branch-target origin/${{ github.base_ref }} --run-gitlint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[general] | ||
ignore-fixup-commits=false | ||
|
||
[title-must-not-contain-word] | ||
words=wip,fixup | ||
|
||
# Enforce at least 20 characters (default value) in every commit body | ||
[body-min-length] | ||
|
||
# Tags do not count towards the body length | ||
[ignore-body-lines] | ||
regex=^Signed-off-by |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters