Added linux kernel checkpatch.pl script and stylecheck target.
To make it easier on everyone to keep a uniform coding style throughout the project we will be using this target to verify our code for complience. Currently a lot of files in the project don't fully follow the coding style. We need to reach that spot over time though. :)
This commit is contained in:
parent
230c673a3e
commit
48e0f3326b
12
Makefile
12
Makefile
@ -20,6 +20,9 @@
|
||||
PREFIX ?= arm-none-eabi
|
||||
#PREFIX ?= arm-elf
|
||||
|
||||
STYLECHECK := scripts/checkpatch.pl
|
||||
STYLECHECKFLAGS := --no-tree -f
|
||||
|
||||
ifeq ($(DETECT_TOOLCHAIN),)
|
||||
DESTDIR ?= /usr/local
|
||||
else
|
||||
@ -96,5 +99,12 @@ clean: cleanheaders
|
||||
@printf " CLEAN doxygen\n"
|
||||
$(Q)$(MAKE) -C doc clean
|
||||
|
||||
.PHONY: build lib $(LIB_DIRS) install doc clean generatedheaders cleanheaders
|
||||
stylecheck:
|
||||
$(Q)for i in `find . -name '*.[ch]'` ; do \
|
||||
if ! grep -q "* It was generated by the irq2nvic_h script." $$i ; then \
|
||||
$(STYLECHECK) $(STYLECHECKFLAGS) $$i || exit $?; \
|
||||
fi ; \
|
||||
done
|
||||
|
||||
.PHONY: build lib $(LIB_DIRS) install doc clean generatedheaders cleanheaders stylecheck
|
||||
|
||||
|
3733
scripts/checkpatch.pl
Executable file
3733
scripts/checkpatch.pl
Executable file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user