Apply SwiftFormat (#44)
* add .swiftFormat add Run script for swiftFormat * Remove some conditions
This commit is contained in:
parent
93edcee7dd
commit
bbfbd32f34
|
@ -0,0 +1,18 @@
|
||||||
|
# version: 0.47.5
|
||||||
|
|
||||||
|
--indent 4 #indent
|
||||||
|
--self init-only # redundantSelf
|
||||||
|
--semicolons never # semicolons
|
||||||
|
--stripunusedargs closure-only # unusedArguments
|
||||||
|
--maxwidth 140 #wrap
|
||||||
|
--assetliterals visual-width #wrap
|
||||||
|
--wraparguments after-first # wrapArguments
|
||||||
|
--wrapparameters after-first # wrapArguments
|
||||||
|
--wrapcollections before-first # wrapArguments
|
||||||
|
--wrapconditions after-first # wrapArguments
|
||||||
|
--funcattributes prev-line # wrapAttributes
|
||||||
|
--typeattributes prev-line # wrapAttributes
|
||||||
|
--varattributes prev-line # wrapAttributes
|
||||||
|
|
||||||
|
--enable isEmpty
|
||||||
|
--disable strongOutlets,yodaConditions
|
|
@ -427,6 +427,7 @@
|
||||||
isa = PBXNativeTarget;
|
isa = PBXNativeTarget;
|
||||||
buildConfigurationList = 535870712669D21700D05A09 /* Build configuration list for PBXNativeTarget "JellyfinPlayer tvOS" */;
|
buildConfigurationList = 535870712669D21700D05A09 /* Build configuration list for PBXNativeTarget "JellyfinPlayer tvOS" */;
|
||||||
buildPhases = (
|
buildPhases = (
|
||||||
|
62F49E8926721894002F2064 /* SwiftFormat */,
|
||||||
5358705C2669D21600D05A09 /* Sources */,
|
5358705C2669D21600D05A09 /* Sources */,
|
||||||
5358705D2669D21600D05A09 /* Frameworks */,
|
5358705D2669D21600D05A09 /* Frameworks */,
|
||||||
5358705E2669D21600D05A09 /* Resources */,
|
5358705E2669D21600D05A09 /* Resources */,
|
||||||
|
@ -451,6 +452,7 @@
|
||||||
isa = PBXNativeTarget;
|
isa = PBXNativeTarget;
|
||||||
buildConfigurationList = 5377CC1B263B596B003A4E83 /* Build configuration list for PBXNativeTarget "JellyfinPlayer iOS" */;
|
buildConfigurationList = 5377CC1B263B596B003A4E83 /* Build configuration list for PBXNativeTarget "JellyfinPlayer iOS" */;
|
||||||
buildPhases = (
|
buildPhases = (
|
||||||
|
62F49E8826721881002F2064 /* SwiftFormat */,
|
||||||
5377CBED263B596A003A4E83 /* Sources */,
|
5377CBED263B596A003A4E83 /* Sources */,
|
||||||
5377CBEE263B596A003A4E83 /* Frameworks */,
|
5377CBEE263B596A003A4E83 /* Frameworks */,
|
||||||
5377CBEF263B596A003A4E83 /* Resources */,
|
5377CBEF263B596A003A4E83 /* Resources */,
|
||||||
|
@ -577,6 +579,45 @@
|
||||||
};
|
};
|
||||||
/* End PBXResourcesBuildPhase section */
|
/* End PBXResourcesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXShellScriptBuildPhase section */
|
||||||
|
62F49E8826721881002F2064 /* SwiftFormat */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputFileListPaths = (
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
);
|
||||||
|
name = SwiftFormat;
|
||||||
|
outputFileListPaths = (
|
||||||
|
);
|
||||||
|
outputPaths = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "\"$SRCROOT\"/Scripts/SwiftFormat.sh\n";
|
||||||
|
};
|
||||||
|
62F49E8926721894002F2064 /* SwiftFormat */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputFileListPaths = (
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
);
|
||||||
|
name = SwiftFormat;
|
||||||
|
outputFileListPaths = (
|
||||||
|
);
|
||||||
|
outputPaths = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "\"$SRCROOT\"/Scripts/SwiftFormat.sh \n";
|
||||||
|
};
|
||||||
|
/* End PBXShellScriptBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXSourcesBuildPhase section */
|
/* Begin PBXSourcesBuildPhase section */
|
||||||
5358705C2669D21600D05A09 /* Sources */ = {
|
5358705C2669D21600D05A09 /* Sources */ = {
|
||||||
isa = PBXSourcesBuildPhase;
|
isa = PBXSourcesBuildPhase;
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
# Type a script or drag a script file from your workspace to insert its path.
|
||||||
|
if which swiftformat >/dev/null; then
|
||||||
|
swiftformat . --lint --lenient
|
||||||
|
else
|
||||||
|
echo "warning: SwiftFormat not installed, download from https://github.com/nicklockwood/SwiftFormat"
|
||||||
|
fi
|
Loading…
Reference in New Issue