diff options
author | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2018-10-17 20:51:30 -0700 |
---|---|---|
committer | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2018-10-17 20:52:58 -0700 |
commit | 7d6901bff26df14e910bb187f1cd08914feea2d3 (patch) | |
tree | a89531b6fd3fa38874052d14ca2c5213d6491c7d | |
parent | 273fa0ab2601f91683a73524470aa4a1e870d42d (diff) | |
download | pugixml-7d6901bff26df14e910bb187f1cd08914feea2d3.zip pugixml-7d6901bff26df14e910bb187f1cd08914feea2d3.tar.gz pugixml-7d6901bff26df14e910bb187f1cd08914feea2d3.tar.bz2 |
Add .clang-format and Makefile rule for formatting
-rw-r--r-- | .clang-format | 10 | ||||
-rw-r--r-- | Makefile | 3 |
2 files changed, 13 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..e2d5ba7 --- /dev/null +++ b/.clang-format @@ -0,0 +1,10 @@ +UseTab: ForIndentation +TabWidth: 4 +IndentWidth: 4 +BreakBeforeBraces: Allman +IndentCaseLabels: false +ColumnLimit: 0 +PointerAlignment: Left +BreakConstructorInitializersBeforeComma: true +NamespaceIndentation: None +AlignEscapedNewlines: DontAlign @@ -74,6 +74,9 @@ release: build/pugixml-$(VERSION).tar.gz build/pugixml-$(VERSION).zip docs: docs/quickstart.html docs/manual.html +format: + clang-format -i src/*.cpp src/*.hpp tests/*.cpp tests/*.hpp + build/pugixml-%: .FORCE | $(RELEASE) @mkdir -p $(BUILD) TIMESTAMP=`git show v$(VERSION) -s --format=%ct` && python scripts/archive.py $@ pugixml-$(VERSION) $$TIMESTAMP $| |