toxcore/other/astyle
iphydf a8823830d3
Add some astyle options to make it do more.
It now enforces a bit more formatting. In particular, padding inside
parentheses is removed. I would like it to remove padding after unary
operators, but there seems to be no option for that.
2016-09-13 01:07:02 +01:00
..
astylerc Add some astyle options to make it do more. 2016-09-13 01:07:02 +01:00
format-source Print a message about missing astyle in format-source. 2016-09-07 23:11:13 +01:00
pre-commit Switched tox.h to the dsl generated one. 2015-04-25 20:39:13 -04:00
README.md Add real instruction on how to use APIDSL and astyle 2015-06-20 01:22:46 +01:00

This directory can house various tools and utilities.

How to use astyle

Manually

For all files

Run from toxcore directory:

astyle --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

For selected file

Run from toxcore directory, e.g. for tox.h file:

astyle --options=./other/astyle/astylerc ./toxcore/tox.h

Automatically, as pre-commit hook (*NIX only)

Copy astylerc to toxcore/.git/hooks

Why

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.

Furthermore, it is being used to format tox.h after using apidsl to generate it.