summaryrefslogtreecommitdiff
path: root/other/astyle
diff options
context:
space:
mode:
authorZetok Zalbavar <zexavexxe@gmail.com>2015-06-20 01:22:46 +0100
committerZetok Zalbavar <zexavexxe@gmail.com>2015-06-20 01:22:46 +0100
commit68dc14f80c7ae202ababbd0372a04b137ea8b563 (patch)
tree555462d287d3b54152c58c100591c88b1c0f5e33 /other/astyle
parent67df1ab7ce6b6cb8103ddf73df814f685240a59c (diff)
Add real instruction on how to use APIDSL and astyle
also add to "tox{,.in}.h" note that "tox.h" shouldn't be edited directly, pointing to "tox.in.h"
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