Skip to content

Commit

Permalink
Project Settings Changes (#1297)
Browse files Browse the repository at this point in the history
* Add compiler flag for long type checking warning

* duplicate file references.

* Reduce expression complexity

* Replace deprecated SwiftLint rule

* Bump SwiftFormat version

* Bump Swift version of SwiftLint
  • Loading branch information
chickdan authored Oct 31, 2024
1 parent fed9c65 commit 9e11901
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 13 deletions.
7 changes: 4 additions & 3 deletions .swiftformat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# version: 0.49.11
# version: 0.54.6

--swiftversion 5.5
--swiftversion 5.6

--tabwidth 4
--xcodeindentation enabled
Expand All @@ -14,7 +14,8 @@
--wrapconditions after-first
--funcattributes prev-line
--typeattributes prev-line
--varattributes prev-line
--computedvarattrs prev-line
--storedvarattrs prev-line
--trailingclosures
--shortoptionals "always"
--ifdef no-indent
Expand Down
4 changes: 3 additions & 1 deletion Shared/Extensions/JellyfinAPI/ServerTicks.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ extension ServerTicks {

init(date: Date) {
let components = Calendar.current.dateComponents([.hour, .minute], from: date)
let totalSeconds = TimeInterval((components.hour ?? 0) * 3600 + (components.minute ?? 0) * 60)
let hour = components.hour ?? 0
let minute = components.minute ?? 0
let totalSeconds = TimeInterval(hour * 3600 + minute * 60)
self = Int(totalSeconds * 10_000_000)
}

Expand Down
8 changes: 3 additions & 5 deletions Swiftfin.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@
4EC6C16B2C92999800FC904B /* TranscodeSection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EC6C16A2C92999800FC904B /* TranscodeSection.swift */; };
4ECDAA9E2C920A8E0030F2F5 /* TranscodeReason.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4ECDAA9D2C920A8E0030F2F5 /* TranscodeReason.swift */; };
4ECDAA9F2C920A8E0030F2F5 /* TranscodeReason.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4ECDAA9D2C920A8E0030F2F5 /* TranscodeReason.swift */; };
4EDBDCD12CBDD6590033D347 /* SessionInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EDBDCD02CBDD6510033D347 /* SessionInfo.swift */; };
4EDBDCD22CBDD6590033D347 /* SessionInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EDBDCD02CBDD6510033D347 /* SessionInfo.swift */; };
4EE141692C8BABDF0045B661 /* ActiveSessionProgressSection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EE141682C8BABDF0045B661 /* ActiveSessionProgressSection.swift */; };
4EED874A2CBF824B002354D2 /* DeviceRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EED87462CBF824B002354D2 /* DeviceRow.swift */; };
4EED874B2CBF824B002354D2 /* DevicesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EED87482CBF824B002354D2 /* DevicesView.swift */; };
Expand Down Expand Up @@ -4279,7 +4277,7 @@
New,
);
LastSwiftUpdateCheck = 1250;
LastUpgradeCheck = 1530;
LastUpgradeCheck = 1610;
TargetAttributes = {
5358705F2669D21600D05A09 = {
CreatedOnToolsVersion = 12.5;
Expand Down Expand Up @@ -4686,7 +4684,6 @@
4E17498F2CC00A3100DD07D1 /* DeviceInfo.swift in Sources */,
E12CC1C928D132B800678D5D /* RecentlyAddedView.swift in Sources */,
E19D41B32BF2BFEF0082B8B2 /* URLSessionConfiguration.swift in Sources */,
4EDBDCD12CBDD6590033D347 /* SessionInfo.swift in Sources */,
E10B1ECE2BD9AFD800A92EAF /* SwiftfinStore+V2.swift in Sources */,
E150C0BE2BFD45BD00944FFA /* RedrawOnNotificationView.swift in Sources */,
E1763A722BF3F67C004DF6AB /* SwiftfinStore+Mappings.swift in Sources */,
Expand Down Expand Up @@ -5194,7 +5191,6 @@
E1D4BF812719D22800A11E64 /* AppAppearance.swift in Sources */,
E1BDF2EF29522A5900CC0294 /* AudioActionButton.swift in Sources */,
E174120F29AE9D94003EF3B5 /* NavigationCoordinatable.swift in Sources */,
4EDBDCD22CBDD6590033D347 /* SessionInfo.swift in Sources */,
E10231392BCF8A3C009D71FC /* ProgramButtonContent.swift in Sources */,
E1DC9844296DECB600982F06 /* ProgressIndicator.swift in Sources */,
6220D0B126D5EC9900B8E046 /* SettingsCoordinator.swift in Sources */,
Expand Down Expand Up @@ -5640,6 +5636,7 @@
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_SWIFT_FLAGS = "-Xfrontend -warn-long-expression-type-checking=200";
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
Expand Down Expand Up @@ -5698,6 +5695,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "-Xfrontend -warn-long-expression-type-checking=200";
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/kean/Pulse",
"state" : {
"revision" : "3ac5ee35ab233e900aa484919803d51791d1e351",
"version" : "4.2.7"
"revision" : "d1e39ffaaa8b8becff80cb193c93a78e32077af8",
"version" : "4.2.0"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1530"
LastUpgradeVersion = "1610"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1530"
LastUpgradeVersion = "1610"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down

0 comments on commit 9e11901

Please sign in to comment.