forked from freebsd/freebsd-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We check style with my hacky style checker and also make sure the email address of the author doesn't have noreply in it. Right now the style checking is only the last 10 commits, which may include other people's work. Sponsored by: Netflix
- Loading branch information
Showing
2 changed files
with
45 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,34 @@ | ||
--- | ||
name: Quick Checker | ||
|
||
on: | ||
push: | ||
branches: [ 'ci-*' ] | ||
pull_request: | ||
branches: [ 'main' ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 500 | ||
- name: Pull pain | ||
run: git fetch --no-tags --no-recurse-submodules --depth=500 origin main | ||
- name: Environment | ||
run: | | ||
echo $GITHUB_REF_NAME | ||
git rev-list -1 $GITHUB_REF_NAME | ||
git rev-list -1 origin/main | ||
- name: Recent enough main? | ||
run: git merge-base origin/main $GITHUB_REF_NAME | ||
- name: Check Email | ||
run: sh ./tools/build/check-email.sh origin/main..$GITHUB_REF_NAME | ||
- name: Check Style | ||
run: ./tools/build/checkstyle9.pl -color=always origin/main..$GITHUB_REF_NAME |
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,11 @@ | ||
#!/bin/sh | ||
|
||
# Quick check to make sure all emails in the branch are good | ||
# Anything with noreply in the address | ||
|
||
bad=$(git log --pretty="%ae" "$@" | grep noreply) || exit 1 | ||
if [ -n "${bad}" ] ; then | ||
echo "Found the following bad email addresses: ${bad}" | ||
exit 1 | ||
fi | ||
exit 0 |