This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Adds coding style script

Apply razor-qt coding style to all c, cpp and header files in and below
the current directory.

Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com>
  • Loading branch information...
luis-pereira committed May 31, 2012
1 parent f303fb6 commit 8ba8a8554f13f323b4f5d23d80078092927bf844
Showing with 17 additions and 0 deletions.
  1. +17 −0 scripts/astyle-razorqt.sh
View
@@ -0,0 +1,17 @@
+#!/bin/bash
+#
+# Based on the QRegExp-Editor script:
+# https://gitorious.org/qregexp-editor/qregexp-editor/blobs/master/scripts/astyle-qregexp_editor
+#
+# apply razor-qt coding style to all c, cpp and header files in and below the current directory
+#
+# the coding style is defined in https://github.com/Razor-qt/razor-qt/wiki/Coding-Style
+#
+# requirements: installed astyle => 1.24
+
+OPTS="--indent=spaces=4 --style=allman --add-brackets \
+ --indent-labels --pad-header --pad-oper --unpad-paren \
+ --keep-one-line-blocks --convert-tabs \
+ --indent-preprocessor --align-pointer=name"
+
+astyle ${OPTS} $(find . -regex ".*\.\(c\|cpp\|h\)$")

0 comments on commit 8ba8a85

Please sign in to comment.