MAKEFILE - FORMAT - Trailing Whitespace

`make format` now additionally removes trailing whitespace.  Also now
ignores .bit files.

Signed-off-by: Jake Mercer <jake.mercer@civica.co.uk>
This commit is contained in:
Jake Mercer 2019-10-20 00:58:21 +01:00
parent b243db2d05
commit e2e2d41405
1 changed files with 6 additions and 3 deletions

View File

@ -58,7 +58,7 @@ test-cpp:
# Auto formatting of code.
# ------------------------
FORMAT_EXCLUDE = $(foreach x,$(ALL_EXCLUDE),-and -not -path './$(x)/*')
FORMAT_EXCLUDE = $(foreach x,$(ALL_EXCLUDE),-and -not -path './$(x)/*') -and -not -name *.bit
CLANG_FORMAT ?= clang-format-5.0
format-cpp:
@ -76,10 +76,13 @@ TCL_FORMAT ?= utils//tcl-reformat.sh
format-tcl:
find . -name \*.tcl $(FORMAT_EXCLUDE) -print0 | xargs -0 -P $$(nproc) -n 1 $(TCL_FORMAT)
format: format-cpp format-docs format-py format-tcl
format-trailing-ws:
find . -type f $(FORMAT_EXCLUDE) | xargs sed -i 's@\s\+$$@@g'
format: format-cpp format-docs format-py format-tcl format-trailing-ws
@true
.PHONY: format format-cpp format-py format-tcl
.PHONY: format format-cpp format-py format-tcl format-trailing-ws
# Targets related to Project X-Ray databases
# ------------------------