diff options
| author | Christian Hopps <chopps@labn.net> | 2023-06-20 01:03:46 -0400 |
|---|---|---|
| committer | Christian Hopps <chopps@labn.net> | 2023-06-20 01:05:30 -0400 |
| commit | 786a1e95bcbedd912882bc1e87f2994c48477410 (patch) | |
| tree | 9070ccfa92b2d7ec66c491a414f03125c22a0a12 /doc/developer/workflow.rst | |
| parent | f7bec5aab1045496d8ce71403de3e5fb000b06da (diff) | |
doc: add the linux doc for checkpatch.pl
Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'doc/developer/workflow.rst')
| -rw-r--r-- | doc/developer/workflow.rst | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/doc/developer/workflow.rst b/doc/developer/workflow.rst index 0b386bf09f..16ec3dc87b 100644 --- a/doc/developer/workflow.rst +++ b/doc/developer/workflow.rst @@ -868,14 +868,17 @@ clang-format https://clang.llvm.org/docs/ClangFormat.html checkpatch.sh +checkpatch.pl + In the Linux kernel source tree there is a Perl script used to check - incoming patches for style errors. FRR uses an adapted version of this - script for the same purpose. It can be found at - :file:`tools/checkpatch.sh`. This script takes a git-formatted diff or - patch file, applies it to a clean FRR tree, and inspects the result to catch - potential style errors. Running this script on your patches before - submission is highly recommended. The CI system runs this script as well and - will comment on the PR with the results if style errors are found. + incoming patches for style errors. FRR uses a shell script front end and an + adapted version of the perl script for the same purpose. These scripts can + be found at :file:`tools/checkpatch.sh` and :file:`tools/checkpatch.pl`. + This script takes a git-formatted diff or patch file, applies it to a clean + FRR tree, and inspects the result to catch potential style errors. Running + this script on your patches before submission is highly recommended. The CI + system runs this script as well and will comment on the PR with the results + if style errors are found. It is run like this:: @@ -916,6 +919,10 @@ checkpatch.sh If the script finds one or more WARNINGs it will exit with 1. If it finds one or more ERRORs it will exit with 2. + For convenience the Linux documentation for the :file:`tools/checkpatch.pl` + script has been included unmodified (i.e., it has not been updated to + reflect local changes) :doc:`here <checkpatch>` + Please remember that while FRR provides these tools for your convenience, responsibility for properly formatting your code ultimately lies on the |
