• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

README.mdH A D06-Dec-2021884 3318

astylercH A D06-Dec-2021360 2721

format-sourceH A D06-Dec-20212.5 KiB10885

pre-commitH A D06-Dec-2021532 178

README.md

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 ./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`` to generate it.
33