Skip to contentSkip to conversation

docs/config: document how *-cmd is run

PATCH Applied Brandon Maier 2 participants 2 messages Jun 27, 2024 – Sep 6, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 docs/config: document how *-cmd is run

For someone not familiar with checkpatch and get_maintainer's flags, it's not obvious how the commands are used. Document this to help users trying to add custom checkers.

---
 docs/config.rst | 28 ++++++++++++++++++----------
 1 file changed, 18 insertions(+), 10 deletions(-)
docs/config.rst +18 -10
index c49f5d2..da58534 100644
@@ -161,9 +161,11 @@ These settings control ``b4 am`` and ``b4 shazam`` behavior.
   Default: ``None``
 
 ``b4.am-perpatch-check-cmd`` (v0.14+)
-  The command to use when running with ``--check``. If b4 finds
-  ``scripts/checkpatch.pl`` at the top of your git tree, it uses the
-  command shown below by default.
+  The command to use when running ``--check``. The command is run once for each
+  patch to check. The patch file to check is piped through stdin. If this
+  config is defined multiple times, all commands will be run. If this config is
+  not defined and b4 finds ``scripts/checkpatch.pl`` at the top of your git
+  tree, it uses the command shown below by default.
 
   Default: ``./scripts/checkpatch.pl -q --terse --no-summary --mailback``
 
@@ -379,14 +381,18 @@ Contributor-oriented settings
   Default: ``no``
 
 ``b4.send-auto-to-cmd``
-  The command to use for obtaining the list of "To:" recipients. Has no effect
-  if the specified script isn't present in the repository.
+  The command to use for obtaining the list of "To:" recipients. The command is
+  run once for each patch in the series. Each patch file is piped through
+  stdin. If b4 finds ``scripts/get_maintainer.pl`` at the top of your git tree,
+  it uses the command shown below by default.
 
   Default: ``scripts/get_maintainer.pl --nogit --nogit-fallback --nogit-chief-penguins --norolestats --nol``
 
 ``b4.send-auto-cc-cmd``
-  The command to use for obtaining the list of Cc: recipients. Has no effect
-  if the specified script isn't present in the repository.
+  The command to use for obtaining the list of "Cc:" recipients. The command is
+  run once for each patch in the series. Each patch file is piped through
+  stdin. If b4 finds ``scripts/get_maintainer.pl`` at the top of your git tree,
+  it uses the command shown below by default.
 
   Default:: ``scripts/get_maintainer.pl --nogit --nogit-fallback --nogit-chief-penguins --norolestats --nom``
 
@@ -426,9 +432,11 @@ Contributor-oriented settings
   Default: ``None``
 
 ``b4.prep-perpatch-check-cmd`` (v0.14+)
-  The command to use when running ``--check``. If b4 finds
-  ``scripts/checkpatch.pl`` at the top of your git tree, it uses the
-  command shown below by default.
+  The command to use when running ``--check``. The command is run once for each
+  patch to check. The patch file to check is piped through stdin. If this
+  config is defined multiple times, all commands will be run. If this config is
+  not defined and b4 finds ``scripts/checkpatch.pl`` at the top of your git
+  tree, it uses the command shown below by default.
 
   Default: ``./scripts/checkpatch.pl -q --terse --no-summary --mailback --showfile```
 

---
base-commit: 131835a44c63511e2def9d7adc680754b7ea502c
change-id: 20240627-check-cmd-docs-799175a9fe4d

Best regards,

Signature · 1 line
Brandon Maier <[email protected]>
#1 lore raw
Quoted 5 lines · Brandon Maier

For someone not familiar with checkpatch and get_maintainer's flags, it's not obvious how the commands are used. Document this to help users trying to add custom checkers.

Applied, thanks!

[1/1] docs/config: document how *-cmd is run

      commit: 6dd85d53b3899cf3cb685b16e7152b640dcbde46

Best regards,

Signature · 1 line
Konstantin Ryabitsev <[email protected]>