From 71b17e05d707607b22085bed84282ac8343a0d39 Mon Sep 17 00:00:00 2001 From: Norio Nomura Date: Wed, 11 Nov 2015 11:38:37 +0900 Subject: [PATCH 1/2] Add `--use-script-input-files` option to swiftlint --- ExtraBuildPhase/ExtraBuildPhase.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ExtraBuildPhase/ExtraBuildPhase.m b/ExtraBuildPhase/ExtraBuildPhase.m index c3712f3..860f223 100644 --- a/ExtraBuildPhase/ExtraBuildPhase.m +++ b/ExtraBuildPhase/ExtraBuildPhase.m @@ -58,7 +58,7 @@ @implementation ExtraBuildPhase(SwizzlingTargetMethods) NSString *shellScript = [defaults stringForKey:@"shellScript"]; if (!shellScript) { shellScript = @"if which swiftlint >/dev/null; then\n" - " swiftlint 2>/dev/null\n" + " swiftlint lint --use-script-input-files 2>/dev/null\n" "fi\n" "exit 0 # ignore result of swiftlint"; } From 06b6c89119051d4fdd96863b6c4c5ac17c58772e Mon Sep 17 00:00:00 2001 From: Norio Nomura Date: Wed, 11 Nov 2015 11:39:33 +0900 Subject: [PATCH 2/2] Change to using `--use-script-input-files` option on README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d374787..d37ea63 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ Restart Xcode after installing # Change shell script defaults write io.github.norio-nomura.ExtraBuildPhase shellScript -string ' if which swiftlint >/dev/null; then - swiftlint lint --config ~/.swiftlint.yml 2>/dev/null + swiftlint lint --use-script-input-files --config ~/.swiftlint.yml 2>/dev/null fi exit 0 # ignore result of swiftlint '