summaryrefslogtreecommitdiff
path: root/other/astyle
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2015-06-19 21:50:59 -0400
committerirungentoo <irungentoo@gmail.com>2015-06-19 21:50:59 -0400
commit8383cc5ae327ba31b461493b571d0ee0834ef333 (patch)
treea73623614827ce0b78a1692cf7109c1235bd4c14 /other/astyle
parent64084ebf8a08d5ccf41845031909b97287860556 (diff)
parent68dc14f80c7ae202ababbd0372a04b137ea8b563 (diff)
Merge branch 'contributing' of https://github.com/zetok/ProjectTox-Core
Diffstat (limited to 'other/astyle')
-rw-r--r--other/astyle/README11
-rw-r--r--other/astyle/README.md32
2 files changed, 32 insertions, 11 deletions
diff --git a/other/astyle/README b/other/astyle/README
deleted file mode 100644
index 26802ec7..00000000
--- a/other/astyle/README
+++ /dev/null
@@ -1,11 +0,0 @@
1This directory can house various tools and utilities.
2
3astylerc
4 - This file can be used in the precommit hook to try its best
5 at making the code conform to the coding style document.
6
7pre-commit (*NIX only at the moment)
8 - Lints your file in adherence to the coding style doucment as
9 best as possible in terms of spacing, indenting, etc.
10 - Requires you to have astyle installed.
11 - To use, copy this file to ProjectTox-Core/.git/hooks
diff --git a/other/astyle/README.md b/other/astyle/README.md
new file mode 100644
index 00000000..f68edf68
--- /dev/null
+++ b/other/astyle/README.md
@@ -0,0 +1,32 @@
1This directory can house various tools and utilities.
2
3# How to use astyle
4
5## Manually
6
7### For all files
8
9Run from ``toxcore`` directory:
10```bash
11astyle --options=./other/astyle/astylerc ./toxcore/*.c ./toxcore/*.h ./toxdns/*.c ./toxdns/*.h ./testing/*.c ./toxav/*.c ./toxav/*.h ./other/*.c ./other/bootstrap_daemon/*.c ./toxencryptsave/*.c ./toxencryptsave/*.h ./auto_tests/*.c
12```
13
14### For selected file
15
16Run from ``toxcore`` directory, e.g. for [``tox.h``](/toxcore/tox.h) file:
17```bash
18astyle --options=./other/astyle/astylerc ./toxcore/tox.h
19```
20
21
22## Automatically, as pre-commit hook (*NIX only)
23
24Copy [``astylerc``](/other/astyle/astylerc) to ``toxcore/.git/hooks``
25
26
27
28# Why
29
30``astylerc`` - this file can be used in the pre-commit hook to try its best at making the code conform to the coding style of toxcore.
31
32Furthermore, it is being used to format ``tox.h`` after using [``apidsl``](/other/apidsl) to generate it. \ No newline at end of file