Add SwiftLint and fix lint warnings
This commit is contained in:
@@ -106,6 +106,7 @@
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
3AA480FA2D3DF10E0052A05C /* PBXTargetDependency */,
|
||||
);
|
||||
fileSystemSynchronizedGroups = (
|
||||
3AA480BA2D3DECF10052A05C /* Yeti */,
|
||||
@@ -128,6 +129,7 @@
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
3AA481002D3DF2080052A05C /* PBXTargetDependency */,
|
||||
3AA480CC2D3DECF20052A05C /* PBXTargetDependency */,
|
||||
);
|
||||
fileSystemSynchronizedGroups = (
|
||||
@@ -151,6 +153,7 @@
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
3AA481022D3DF20D0052A05C /* PBXTargetDependency */,
|
||||
3AA480D62D3DECF20052A05C /* PBXTargetDependency */,
|
||||
);
|
||||
fileSystemSynchronizedGroups = (
|
||||
@@ -195,6 +198,9 @@
|
||||
);
|
||||
mainGroup = 3AA480AF2D3DECF10052A05C;
|
||||
minimizedProjectReferenceProxies = 1;
|
||||
packageReferences = (
|
||||
3AA480F82D3DF0820052A05C /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */,
|
||||
);
|
||||
preferredProjectObjectVersion = 77;
|
||||
productRefGroup = 3AA480B92D3DECF10052A05C /* Products */;
|
||||
projectDirPath = "";
|
||||
@@ -266,6 +272,18 @@
|
||||
target = 3AA480B72D3DECF10052A05C /* Yeti */;
|
||||
targetProxy = 3AA480D52D3DECF20052A05C /* PBXContainerItemProxy */;
|
||||
};
|
||||
3AA480FA2D3DF10E0052A05C /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
productRef = 3AA480F92D3DF10E0052A05C /* SwiftLintBuildToolPlugin */;
|
||||
};
|
||||
3AA481002D3DF2080052A05C /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
productRef = 3AA480FF2D3DF2080052A05C /* SwiftLintBuildToolPlugin */;
|
||||
};
|
||||
3AA481022D3DF20D0052A05C /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
productRef = 3AA481012D3DF20D0052A05C /* SwiftLintBuildToolPlugin */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
@@ -397,6 +415,7 @@
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_ASSET_PATHS = "\"Yeti/Preview Content\"";
|
||||
ENABLE_PREVIEWS = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
|
||||
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
||||
@@ -425,6 +444,7 @@
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_ASSET_PATHS = "\"Yeti/Preview Content\"";
|
||||
ENABLE_PREVIEWS = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
|
||||
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
||||
@@ -552,6 +572,35 @@
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
|
||||
/* Begin XCRemoteSwiftPackageReference section */
|
||||
3AA480F82D3DF0820052A05C /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */ = {
|
||||
isa = XCRemoteSwiftPackageReference;
|
||||
repositoryURL = "https://github.com/SimplyDanny/SwiftLintPlugins";
|
||||
requirement = {
|
||||
kind = upToNextMajorVersion;
|
||||
minimumVersion = 0.58.2;
|
||||
};
|
||||
};
|
||||
/* End XCRemoteSwiftPackageReference section */
|
||||
|
||||
/* Begin XCSwiftPackageProductDependency section */
|
||||
3AA480F92D3DF10E0052A05C /* SwiftLintBuildToolPlugin */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 3AA480F82D3DF0820052A05C /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */;
|
||||
productName = "plugin:SwiftLintBuildToolPlugin";
|
||||
};
|
||||
3AA480FF2D3DF2080052A05C /* SwiftLintBuildToolPlugin */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 3AA480F82D3DF0820052A05C /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */;
|
||||
productName = "plugin:SwiftLintBuildToolPlugin";
|
||||
};
|
||||
3AA481012D3DF20D0052A05C /* SwiftLintBuildToolPlugin */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 3AA480F82D3DF0820052A05C /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */;
|
||||
productName = "plugin:SwiftLintBuildToolPlugin";
|
||||
};
|
||||
/* End XCSwiftPackageProductDependency section */
|
||||
};
|
||||
rootObject = 3AA480B02D3DECF10052A05C /* Project object */;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"originHash" : "1fa961aa1dc717cea452f3389668f0f99a254f07e4eb11d190768a53798f744f",
|
||||
"pins" : [
|
||||
{
|
||||
"identity" : "swiftlintplugins",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/SimplyDanny/SwiftLintPlugins",
|
||||
"state" : {
|
||||
"revision" : "7a3d77f3dd9f91d5cea138e52c20cfceabf352de",
|
||||
"version" : "0.58.2"
|
||||
}
|
||||
}
|
||||
],
|
||||
"version" : 3
|
||||
}
|
||||
@@ -11,7 +11,7 @@ import SwiftData
|
||||
@Model
|
||||
final class Item {
|
||||
var timestamp: Date
|
||||
|
||||
|
||||
init(timestamp: Date) {
|
||||
self.timestamp = timestamp
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import SwiftData
|
||||
struct YetiApp: App {
|
||||
var sharedModelContainer: ModelContainer = {
|
||||
let schema = Schema([
|
||||
Item.self,
|
||||
Item.self
|
||||
])
|
||||
let modelConfiguration = ModelConfiguration(schema: schema, isStoredInMemoryOnly: false)
|
||||
|
||||
|
||||
@@ -15,7 +15,8 @@ final class YetiUITests: XCTestCase {
|
||||
// In UI tests it is usually best to stop immediately when a failure occurs.
|
||||
continueAfterFailure = false
|
||||
|
||||
// In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
|
||||
// In UI tests it’s important to set the initial state - such as interface orientation - required for your
|
||||
// tests before they run. The setUp method is a good place to do this.
|
||||
}
|
||||
|
||||
override func tearDownWithError() throws {
|
||||
|
||||
@@ -9,7 +9,7 @@ import XCTest
|
||||
|
||||
final class YetiUITestsLaunchTests: XCTestCase {
|
||||
|
||||
override class var runsForEachTargetApplicationUIConfiguration: Bool {
|
||||
override static var runsForEachTargetApplicationUIConfiguration: Bool {
|
||||
true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user