You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2015/03/06 05:01:47 UTC
[11/19] ios commit: CB-8506 - Use npm version of uncrustify in
cordova-ios
CB-8506 - Use npm version of uncrustify in cordova-ios
Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/2588a805
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/2588a805
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/2588a805
Branch: refs/heads/4.0.x
Commit: 2588a805758ac979cf88ab8d733cb78bd61b645a
Parents: 7422425
Author: Shazron Abdullah <sh...@gmail.com>
Authored: Wed Feb 18 15:44:20 2015 -0700
Committer: Shazron Abdullah <sh...@gmail.com>
Committed: Wed Feb 18 15:44:20 2015 -0700
----------------------------------------------------------------------
bin/uncrustify.sh | 5 +++--
hooks/pre-commit | 5 -----
package.json | 3 ++-
3 files changed, 5 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/2588a805/bin/uncrustify.sh
----------------------------------------------------------------------
diff --git a/bin/uncrustify.sh b/bin/uncrustify.sh
index 3c23230..10ba377 100755
--- a/bin/uncrustify.sh
+++ b/bin/uncrustify.sh
@@ -20,6 +20,7 @@
SCRIPT_PATH=$(dirname $0)
CONFIG="$SCRIPT_PATH/uncrustify.cfg"
+EXE="$SCRIPT_PATH/../node_modules/.bin/uncrustify"
function Usage() {
echo "Formats code using uncrustify."
@@ -32,7 +33,7 @@ function Usage() {
}
function VerifyEnv() {
- if ! which uncrustify > /dev/null; then
+ if ! which "$EXE" > /dev/null; then
echo "uncrustify binary not found. Please ensure that it is in your PATH."
echo "Install via homebrew using: brew install uncrustify"
exit 1
@@ -77,7 +78,7 @@ elif [[ "$1" = "--all" ]]; then
files=$(find .)
FilterAndRun $files
elif [[ "$1" = "--check-file" ]]; then
- uncrustify -q -l OC -c "$CONFIG" -f "$2" | cmp --quiet - "$2"
+ "$EXE" -q -l OC -c "$CONFIG" -f "$2" | cmp --quiet - "$2"
elif [[ "$1" = "--filter" ]]; then
FilterFileList "$@"
elif [[ "$1" = -* ]]; then
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/2588a805/hooks/pre-commit
----------------------------------------------------------------------
diff --git a/hooks/pre-commit b/hooks/pre-commit
index 1611f52..bcff748 100755
--- a/hooks/pre-commit
+++ b/hooks/pre-commit
@@ -24,11 +24,6 @@ PATH=$PATH:/usr/local/bin:/usr/local/sbin
exec 1>&2
test $SKIP_UNCRUSTIFY && exit 0
-if [[ "$(uncrustify --version | cut -d' ' -f2)" != 0.60 ]]; then
- echo "Please install version 0.60 of uncrustify."
- exit 1
-fi
-
RET=0
files=$(bin/uncrustify.sh --filter $(git diff --cached --name-only))
MSGS=
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/2588a805/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 2f4b5d4..6c84626 100644
--- a/package.json
+++ b/package.json
@@ -27,6 +27,7 @@
"nodeunit": "^0.8.7"
},
"devDependencies": {
- "jshint": "^2.6.0"
+ "jshint": "^2.6.0",
+ "uncrustify": "^0.6.1"
}
}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org