-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: enable code formatting and linting
Ran swiftlint and swiftformat. Lots of files changed because code has not been formatted or linted in quite a while. Added .swift-version because without it, swiftformat has some features disabled. commit-id:5e8eb13d
- Loading branch information
1 parent
208a1b2
commit 76d4567
Showing
49 changed files
with
714 additions
and
901 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
5.10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Rules: https://realm.github.io/SwiftLint/rule-directory.html | ||
# Config file learn more: https://github.com/realm/SwiftLint#configuration | ||
|
||
disabled_rules: | ||
- line_length # The swiftformat tool formats the swift code for us to not have super long lines. This rule after swiftformat has become more of an annoyance then a value where most errors are error message strings being too long. | ||
- unused_optional_binding # `let _ =` can be easier to read sometimes then `!= nil` which is what this rule is trying to catch. | ||
- nesting # It can be easier to read code when a class has many nested classes inside of it (example: JSON Codable structs for deserializing JSON). | ||
- identifier_name # Variable names that are short in length can sometimes make code hard to read which this rule tries to catch. However, sometimes variable names that are 2 characters long are OK. We can catch bad variable naming in pull requests. | ||
|
||
excluded: # paths or files to ignore during linting. Takes precedence over `included`. | ||
- .build | ||
- Package.swift | ||
- app/*/Pods | ||
- Source/autogenerated | ||
|
||
reporter: "emoji" # reporter type (xcode, json, csv, checkstyle, codeclimate, junit, html, emoji, sonarqube, markdown, github-actions-logging) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
krzysztofzablocki/[email protected] | ||
yonaskolb/[email protected] | ||
yonaskolb/[email protected] | ||
realm/[email protected] | ||
nicklockwood/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,37 @@ | ||
// swift-tools-version:5.8 | ||
|
||
import PackageDescription | ||
import Foundation | ||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "Wendy", | ||
platforms: [ | ||
.iOS(.v13) | ||
], | ||
products: [ | ||
.library(name: "Wendy", targets: ["Wendy"]) | ||
], | ||
dependencies: [ | ||
// Help for the format of declaring SPM dependencies: | ||
// https://web.archive.org/web/20220525200227/https://www.timc.dev/posts/understanding-swift-packages/ | ||
// | ||
// Update to exact version until wrapper SDKs become part of testing pipeline. | ||
.package(url: "https://github.com/groue/Semaphore.git", from: "0.0.8") | ||
], | ||
targets: [ | ||
.target(name: "Wendy", | ||
dependencies: ["Semaphore"], | ||
path: "Source/", | ||
resources: [ | ||
.process("PrivacyInfo.xcprivacy") | ||
]), | ||
.testTarget(name: "WendyTests", | ||
dependencies: ["Wendy"], | ||
path: "Tests/") | ||
] | ||
) | ||
let package = Package(name: "Wendy", | ||
platforms: [ | ||
.iOS(.v13) | ||
], | ||
products: [ | ||
.library(name: "Wendy", targets: ["Wendy"]) | ||
], | ||
dependencies: [ | ||
// Help for the format of declaring SPM dependencies: | ||
// https://web.archive.org/web/20220525200227/https://www.timc.dev/posts/understanding-swift-packages/ | ||
// | ||
// Update to exact version until wrapper SDKs become part of testing pipeline. | ||
.package(url: "https://github.com/groue/Semaphore.git", from: "0.0.8") | ||
], | ||
targets: [ | ||
.target(name: "Wendy", | ||
dependencies: ["Semaphore"], | ||
path: "Source/", | ||
resources: [ | ||
.process("PrivacyInfo.xcprivacy") | ||
]), | ||
.testTarget(name: "WendyTests", | ||
dependencies: ["Wendy"], | ||
path: "Tests/") | ||
]) | ||
|
||
// Enable swift concurrency to all targets in package | ||
for target in package.targets { | ||
var settings = target.swiftSettings ?? [] | ||
settings.append(.enableExperimentalFeature("StrictConcurrency")) | ||
target.swiftSettings = settings | ||
var settings = target.swiftSettings ?? [] | ||
settings.append(.enableExperimentalFeature("StrictConcurrency")) | ||
target.swiftSettings = settings | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import Foundation | ||
|
||
internal extension PendingTask { | ||
extension PendingTask { | ||
// Using instead of Equatable protocol because Swift does not allow a protocol inherit another protocol *and* I don't want the subclass to inherit Equatable, I just want to internally. | ||
func equals(_ other: PendingTask) -> Bool { | ||
return tag == other.tag && | ||
tag == other.tag && | ||
data == other.data | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.