mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-19 19:14:28 +00:00
Ignore C library files when checking coding style
The C library source files embedded into the Trusted Firmware tree are not required to comply to the Linux Coding Style. Unfortunately, 'make checkpatch' does take them into account. This patch modifies the Makefile so that the C library source and header files are now ignored by 'make checkpatch'. It also instructs the checkpatch.pl script to not treat the presence of a 'Change-Id' line in the commit message as an error. Change-Id: I38196202efe518bae3a57c2affe2ed7758c9f69c
This commit is contained in:
parent
0412c66a9e
commit
95d5353c33
1 changed files with 4 additions and 2 deletions
6
Makefile
6
Makefile
|
@ -77,10 +77,12 @@ TRUSTED_BOARD_BOOT := 0
|
||||||
AUTH_MOD := none
|
AUTH_MOD := none
|
||||||
|
|
||||||
# Checkpatch ignores
|
# Checkpatch ignores
|
||||||
CHECK_IGNORE = --ignore COMPLEX_MACRO
|
CHECK_IGNORE = --ignore COMPLEX_MACRO --ignore GERRIT_CHANGE_ID
|
||||||
|
|
||||||
CHECKPATCH_ARGS = --no-tree --no-signoff ${CHECK_IGNORE}
|
CHECKPATCH_ARGS = --no-tree --no-signoff ${CHECK_IGNORE}
|
||||||
CHECKCODE_ARGS = --no-patch --no-tree --no-signoff ${CHECK_IGNORE}
|
CHECKCODE_ARGS = --no-patch --no-tree --no-signoff ${CHECK_IGNORE}
|
||||||
|
# Do not check the coding style on C library files
|
||||||
|
CHECK_PATHS = $(shell ls -I include -I lib) $(shell ls -I stdlib include) $(shell ls -I stdlib lib)
|
||||||
|
|
||||||
ifeq (${V},0)
|
ifeq (${V},0)
|
||||||
Q=@
|
Q=@
|
||||||
|
@ -361,7 +363,7 @@ checkcodebase: locate-checkpatch
|
||||||
|
|
||||||
checkpatch: locate-checkpatch
|
checkpatch: locate-checkpatch
|
||||||
@echo " CHECKING STYLE"
|
@echo " CHECKING STYLE"
|
||||||
@git format-patch --stdout ${BASE_COMMIT} | ${CHECKPATCH} ${CHECKPATCH_ARGS} - || true
|
@git log -p ${BASE_COMMIT}..HEAD -- ${CHECK_PATHS} | ${CHECKPATCH} ${CHECKPATCH_ARGS} - || true
|
||||||
|
|
||||||
.PHONY: ${CRTTOOL}
|
.PHONY: ${CRTTOOL}
|
||||||
${CRTTOOL}:
|
${CRTTOOL}:
|
||||||
|
|
Loading…
Add table
Reference in a new issue