diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2014-08-09 18:03:54 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2014-08-09 18:03:54 +0000 |
commit | fc6d64207886ac6921d8f13587c158bfaae76839 (patch) | |
tree | 3a8e243ae439ed9a7d1f16b16e159e452e058509 /protocols/Tox/toxcore/tools | |
parent | ab807bf3e87863ef97412faf83dc2cac697d6a23 (diff) |
toxcore sources added
git-svn-id: http://svn.miranda-ng.org/main/trunk@10139 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/toxcore/tools')
-rw-r--r-- | protocols/Tox/toxcore/tools/README | 11 | ||||
-rw-r--r-- | protocols/Tox/toxcore/tools/astylerc | 11 | ||||
-rw-r--r-- | protocols/Tox/toxcore/tools/pre-commit | 17 |
3 files changed, 39 insertions, 0 deletions
diff --git a/protocols/Tox/toxcore/tools/README b/protocols/Tox/toxcore/tools/README new file mode 100644 index 0000000000..26802ec73d --- /dev/null +++ b/protocols/Tox/toxcore/tools/README @@ -0,0 +1,11 @@ +This directory can house various tools and utilities. + +astylerc + - This file can be used in the precommit hook to try its best + at making the code conform to the coding style document. + +pre-commit (*NIX only at the moment) + - Lints your file in adherence to the coding style doucment as + best as possible in terms of spacing, indenting, etc. + - Requires you to have astyle installed. + - To use, copy this file to ProjectTox-Core/.git/hooks diff --git a/protocols/Tox/toxcore/tools/astylerc b/protocols/Tox/toxcore/tools/astylerc new file mode 100644 index 0000000000..dd738b7406 --- /dev/null +++ b/protocols/Tox/toxcore/tools/astylerc @@ -0,0 +1,11 @@ +--style=kr + --pad-header + --max-code-length=120 + --convert-tabs + --indent-switches + --pad-oper + --align-pointer=name + --align-reference=name + --preserve-date + --lineend=linux + --break-blocks
\ No newline at end of file diff --git a/protocols/Tox/toxcore/tools/pre-commit b/protocols/Tox/toxcore/tools/pre-commit new file mode 100644 index 0000000000..8f91779df7 --- /dev/null +++ b/protocols/Tox/toxcore/tools/pre-commit @@ -0,0 +1,17 @@ +#!/usr/bin/env sh +# +# An example hook script to verify what is about to be committed. +# Called by "git commit" with no arguments. The hook should +# exit with non-zero status after issuing an appropriate message if +# it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-commit". + +for file in `git diff-index --diff-filter=ACMR --name-only HEAD`; do + if [[ $file == *.c || $file == *.h ]] + then + echo $file + `which astyle` $file --options=tools/astylerc + git add $file + fi +done
\ No newline at end of file |