aboutsummaryrefslogtreecommitdiff
path: root/.checkpatch.conf
AgeCommit message (Collapse)AuthorFilesLines
2022-09-18checkpatch: enable CAMELCASE testAntonio Borneo1-1/+0
OpenOCD has to deal with CamelCase API, mainly from inttypes.h, jimtcl, libusb and Windows. Modify checkpatch script to load from a file the list of allowed CamelCase symbols. Populate the file 'camelcase.txt' with the symbols that OpenOCD has to get from external library, plus some of the symbols that should be fixed later. Enable CAMELCASE test in configuration script. Add generated files to .gitignore. Remove the check for 'known' CamelCase symbols from include folder as this will not work on OpenOCD Jenkins, as it run checkpatch on already patched code. Change-Id: I0415af673ed9f985394405ff8f1eeec81135410a Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6170 Tested-by: jenkins
2022-09-18checkpatch: check for SPDX tags of licenses in useAntonio Borneo1-1/+0
Fix the patch of the external helper spdxcheck.py accordingly to OpenOCD folder structure. List only the current LICENSES subfolders in spdxcheck.py . Enable the check for SPDX headers. Extend the check for TCL and Makefile.am files. Change-Id: I0a40da0127746217ee0ac416058d5ceb922428ff Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/5608 Tested-by: jenkins
2022-09-18checkpatch: add list of typedef used in OpenOCDAntonio Borneo1-0/+2
The new checkpatch from Linux kernel does not recognizes the specific types used in OpenOCD, e.g. "fd_set" and "Jim_Obj". As consequence, it consider "fd_set" as the name of a variable, then misinterpret the asterisk for the pointer "fd_set *" as a multiplication, thus suggest to add a space after the asterisk and replace "fd_set *x" with "fd_set * x". Let checkpatch recognize the typedef used in OpenOCD. Change-Id: Ibc295e6a8b47ffa88b50a6d510b7970760e5199d Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/5607 Tested-by: jenkins
2022-09-18checkpatch: don't spell-check the spelling fileAntonio Borneo1-3/+0
Prevent checkpatch to complain for commits that add new entries in the dictionary of misspelled words. Remove the ignore flag TYPO_SPELLING from .checkpatch.conf, now spelling is functional. Change-Id: I911dedafc243e34f753d2be687977066719ff2eb Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/5123 Tested-by: jenkins
2022-09-18checkpatch: check for OpenOCD tree, not for kernel treeAntony Pavlov1-1/+0
checkpatch.pl looks for Linux kernel specific paths and files to check source tree. As openocd misses kernel files it ends with this error message: Must be run from the top-level dir. of a kernel tree This patch also renames 'kernel' -> 'openocd' in source tree-related messages. This is the old commit c5d89883165e ("checkpatch.pl: check for openocd tree, not for kernel tree") re-applied. Also remove the flag "--no-tree" from .checkpatch.conf, not required anymore. Change-Id: I336a66558c75494b7ae339ea63559c31f23aad84 Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/5122 Tested-by: jenkins
2022-09-18checkpatch: treat jenkins as valid emailPaul Fertser1-1/+0
This is needed to avoid checkpatch barking on already committed patches. This is the old commit cadd51971535 ("checkpatch: treat jenkins as valid email") re-applied. Remove the flag BAD_SIGN_OFF, not anymore needed. Change-Id: I6744f80de982f7934f3a5197ac2df1c29962cbd0 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/5120 Tested-by: jenkins
2022-09-18checkpatch: add OpenOCD specific config flagsAntonio Borneo1-0/+25
This initial setup covers the old commits: commit 09571d62bc1e ("checkpatch: disable extern and switch indent checks") commit 2f6f7c442d24 ("checkpatch: remove typedef check") commit 9ad57e96b3c1 ("checkpatch: remove volatile check") commit 3da783f62854 ("checkpatch: increase line length to 120") commit 2af5b97ba31f ("checkpatch: remove __packed and __aligned checks") commit 164450a01576 ("Change checkpatch.pl tab expanding to 4 characters.") It also skips the check for SPDX_LICENSE_TAG, not implemented in OpenOCD yet. Extend to the check in 'strict' mode and skip all the check that cannot apply on OpenOCD project. Change-Id: I6c3bdf27465dc563464fbc8fafbaec696e287624 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/5117 Tested-by: jenkins
2022-09-18checkpatch: import new script version from kernel v6.0-rc3Antonio Borneo1-0/+9
Replace existing checkpatch script with the one available in the latest Linux kernel. Add also from the same kernel version the spelling database and the script spdxcheck.py, even if the script cannot be found by checkpatch in the current path. Add an empty "const_structs.checkpatch" file and an initial "spdxexclude" file. The script as is doesn't work properly in OpenOCD project. Further patches in this series are required. Gerrit will use the checkpatch in this commit to test/build the commit itself. A minimal configuration file is then required to avoid a failure in the test/build process. This commit includes the OpenOCD commits: commit 164450a01576 ("Change checkpatch.pl tab expanding to 4 characters.") commit 667d510dabd5 ("checkpatch: fix false indent trigger") already merged in upstream checkpatch in kernel v6.0-rc3. Change-Id: Ic9cdecff2df0a1e23cdb01d10f14c5988480b8d6 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/5116 Tested-by: jenkins