From 12a377d17d171cf3a28752d9a8ea09f03f3bd091 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Thu, 31 Oct 2024 15:43:48 +0100 Subject: [PATCH 1/2] kernel: Fix some incorrect "since" versions --- lib/kernel/src/net_kernel.erl | 1 + lib/kernel/src/trace.erl | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/kernel/src/net_kernel.erl b/lib/kernel/src/net_kernel.erl index 54e9b8f879c9..d1c97991e333 100644 --- a/lib/kernel/src/net_kernel.erl +++ b/lib/kernel/src/net_kernel.erl @@ -265,6 +265,7 @@ Returns a list of nodes that are explicitly allowed to connect to the node by ca [`allow/1`](`allow/1`). If empty list is returned, it means that any node using the same cookie will be able to connect. """. +-doc(#{since => <<"OTP @OTP-19287@">>}). -spec allowed() -> {ok, Nodes} | ignored when Nodes :: [node()]. allowed() -> request(allowed). diff --git a/lib/kernel/src/trace.erl b/lib/kernel/src/trace.erl index 1d5eb6f711e6..b4cb9468a4b1 100644 --- a/lib/kernel/src/trace.erl +++ b/lib/kernel/src/trace.erl @@ -1384,6 +1384,7 @@ Failures: - **`badarg`** - If the session tracer is not a local process. """. +-doc #{ since => <<"OTP @OTP-19271@">> }. -spec system(Session :: session(), Event :: system_event(), Value :: system_value()) -> ok. From 28a7a0ab488dff6bdcdff805271b50f6c2cb9072 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Thu, 31 Oct 2024 17:23:24 +0100 Subject: [PATCH 2/2] pre-push: Reject commit messages with prefix squash!, DEBUG and TEST --- scripts/pre-push | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/pre-push b/scripts/pre-push index 18d41a06b12d..772d3f273ef1 100755 --- a/scripts/pre-push +++ b/scripts/pre-push @@ -230,18 +230,20 @@ then exit 1 fi - # Check for fixup! commits - FIXUPS=`git log --format='format:%h: %s' $remote_sha..$local_sha | grep -E '^\w+: fixup!'` - if [ -n "$FIXUPS" ] + # Check for invalid commit messages + INVALID_MSG='(fixup!|squash!|TEST|DEBUG)' + BAD_COMMITS=`git log --format='format:%h: %s' $remote_sha..$local_sha | grep -E "^\w+: $INVALID_MSG"` + if [ -n "$BAD_COMMITS" ] then error_color echo "$0 says:" echo "***" - echo "*** \"fixup!\" commit found: NOT ALLOWED!!!!" + echo "*** Forbidden commit message found!!!!" + echo "*** Not allowed: $INVALID_MSG" echo "***" notice_color cat <