summaryrefslogtreecommitdiff
path: root/other/astyle/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'other/astyle/README.md')
-rw-r--r--other/astyle/README.md32
1 files changed, 32 insertions, 0 deletions
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