Skip to content

Commit

Permalink
Adding back swiftlint
Browse files Browse the repository at this point in the history
  • Loading branch information
tbaranes committed Aug 8, 2017
1 parent 10b643d commit 59bbed0
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 17 deletions.
15 changes: 14 additions & 1 deletion AudioPlayerSwift Examples/.swiftlint.yml → .swiftlint.yml
Expand Up @@ -2,6 +2,10 @@ identifier_name:
min_length: 2
excluded:
- x
- T

large_tuple:
- 3

type_name:
excluded:
Expand All @@ -11,7 +15,10 @@ line_length: 150
file_length: 500
number_separator:
minimum_length: 5

disabled_rules:
- todo
private_outlet:
allow_private_set: true
opt_in_rules:
- closure_spacing
- conditional_returns_on_newline
Expand All @@ -28,3 +35,9 @@ opt_in_rules:
- number_separator
- object_literal
- fatal_error_message
- private_outlet
- implicit_return
- multiline_parameters
- vertical_parameter_alignment_on_call
- unneeded_parentheses_in_closure_argument
# - trailing_closure // false positive
24 changes: 12 additions & 12 deletions AudioPlayerSwift Examples/Examples.xcodeproj/project.pbxproj
Expand Up @@ -257,7 +257,7 @@
E21882031D1FF76200218B74 /* Frameworks */,
E21882041D1FF76200218B74 /* Resources */,
E2AF55D61D5E5646003CD574 /* Embed Frameworks */,
E27C4AE91D6791BB004FFBA4 /* Run Script - ⚠️ SwiftLint */,
E27C4AE91D6791BB004FFBA4 /* Run Script - 🤖 SwiftLint */,
);
buildRules = (
);
Expand All @@ -277,7 +277,7 @@
E21882351D1FF7CA00218B74 /* Frameworks */,
E21882361D1FF7CA00218B74 /* Resources */,
E2AF55DB1D5E5651003CD574 /* Embed Frameworks */,
E27C4AEA1D6791C4004FFBA4 /* Run Script - ⚠️ SwiftLint */,
E27C4AEA1D6791C4004FFBA4 /* Run Script - 🤖 SwiftLint */,
);
buildRules = (
);
Expand All @@ -297,7 +297,7 @@
E2A9AF991C498E2900FE943A /* Frameworks */,
E2A9AF9A1C498E2900FE943A /* Resources */,
E2AF55D11D5E5640003CD574 /* Embed Frameworks */,
E27C4AE51D6791AD004FFBA4 /* Run Script - ⚠️ SwiftLint */,
E27C4AE51D6791AD004FFBA4 /* Run Script - 🤖 SwiftLint */,
);
buildRules = (
);
Expand Down Expand Up @@ -416,47 +416,47 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
E27C4AE51D6791AD004FFBA4 /* Run Script - ⚠️ SwiftLint */ = {
E27C4AE51D6791AD004FFBA4 /* Run Script - 🤖 SwiftLint */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Run Script - ⚠️ SwiftLint";
name = "Run Script - 🤖 SwiftLint";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n";
shellScript = "if which swiftlint >/dev/null; then\n swiftlint --config ../.swiftlint.yml\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n";
};
E27C4AE91D6791BB004FFBA4 /* Run Script - ⚠️ SwiftLint */ = {
E27C4AE91D6791BB004FFBA4 /* Run Script - 🤖 SwiftLint */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Run Script - ⚠️ SwiftLint";
name = "Run Script - 🤖 SwiftLint";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n";
shellScript = "if which swiftlint >/dev/null; then\n swiftlint --config ../.swiftlint.yml\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi";
};
E27C4AEA1D6791C4004FFBA4 /* Run Script - ⚠️ SwiftLint */ = {
E27C4AEA1D6791C4004FFBA4 /* Run Script - 🤖 SwiftLint */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Run Script - ⚠️ SwiftLint";
name = "Run Script - 🤖 SwiftLint";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n";
shellScript = "if which swiftlint >/dev/null; then\n swiftlint --config ../.swiftlint.yml\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi";
};
/* End PBXShellScriptBuildPhase section */

Expand Down
3 changes: 0 additions & 3 deletions AudioPlayerSwift/.swiftlint.yml

This file was deleted.

Expand Up @@ -95,7 +95,7 @@ extension AudioPlayerSwiftTests {

func testAudioDidFinishNotification() {
let name = AudioPlayer.SoundDidFinishPlayingNotification
NotificationCenter.default.addObserver(forName: name, object: nil, queue: nil) { _ in
_ = NotificationCenter.default.addObserver(forName: name, object: nil, queue: nil) { _ in
XCTAssertTrue(true)
}

Expand Down
15 changes: 15 additions & 0 deletions AudioPlayerSwift/AudioPlayerSwift.xcodeproj/project.pbxproj
Expand Up @@ -144,6 +144,7 @@
82AC9805E0AEFED634404BB4 /* Sources */,
5CD0611F4BB6772638B5A744 /* Resources */,
1A205DD1B4304E2633DAF938 /* Frameworks */,
E2B205E01F39FA700078339E /* Run Script - 🤖 SwiftLint */,
);
buildRules = (
);
Expand Down Expand Up @@ -234,6 +235,20 @@
shellPath = /bin/sh;
shellScript = "#!/bin/sh\n\ncase \"$PLATFORM_NAME\" in\n macosx) plat=Mac;;\n iphone*) plat=iOS;;\n watch*) plat=watchOS;;\n appletv*) plat=tvOS;;\n *) echo \"error: Unknown PLATFORM_NAME: $PLATFORM_NAME\"; exit 1;;\nesac\n\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\n VAR=SCRIPT_INPUT_FILE_$n\n framework=$(basename \"${!VAR}\")\n export SCRIPT_INPUT_FILE_$n=\"$SRCROOT\"/Carthage/Build/$plat/\"$framework\"\ndone\n\n/usr/local/bin/carthage copy-frameworks || exit\n\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\n VAR=SCRIPT_INPUT_FILE_$n\n source=${!VAR}.dSYM\n dest=${BUILT_PRODUCTS_DIR}/$(basename \"$source\")\n ditto \"$source\" \"$dest\" || exit\ndone";
};
E2B205E01F39FA700078339E /* Run Script - 🤖 SwiftLint */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Run Script - 🤖 SwiftLint";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if which swiftlint >/dev/null; then\n swiftlint --config ../.swiftlint.yml\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi";
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand Down

0 comments on commit 59bbed0

Please sign in to comment.