Add .clang-format and Makefile rule for formatting
This commit is contained in:
parent
273fa0ab26
commit
7d6901bff2
10
.clang-format
Normal file
10
.clang-format
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
UseTab: ForIndentation
|
||||||
|
TabWidth: 4
|
||||||
|
IndentWidth: 4
|
||||||
|
BreakBeforeBraces: Allman
|
||||||
|
IndentCaseLabels: false
|
||||||
|
ColumnLimit: 0
|
||||||
|
PointerAlignment: Left
|
||||||
|
BreakConstructorInitializersBeforeComma: true
|
||||||
|
NamespaceIndentation: None
|
||||||
|
AlignEscapedNewlines: DontAlign
|
||||||
3
Makefile
3
Makefile
@ -74,6 +74,9 @@ release: build/pugixml-$(VERSION).tar.gz build/pugixml-$(VERSION).zip
|
|||||||
|
|
||||||
docs: docs/quickstart.html docs/manual.html
|
docs: docs/quickstart.html docs/manual.html
|
||||||
|
|
||||||
|
format:
|
||||||
|
clang-format -i src/*.cpp src/*.hpp tests/*.cpp tests/*.hpp
|
||||||
|
|
||||||
build/pugixml-%: .FORCE | $(RELEASE)
|
build/pugixml-%: .FORCE | $(RELEASE)
|
||||||
@mkdir -p $(BUILD)
|
@mkdir -p $(BUILD)
|
||||||
TIMESTAMP=`git show v$(VERSION) -s --format=%ct` && python scripts/archive.py $@ pugixml-$(VERSION) $$TIMESTAMP $|
|
TIMESTAMP=`git show v$(VERSION) -s --format=%ct` && python scripts/archive.py $@ pugixml-$(VERSION) $$TIMESTAMP $|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user