Skip to content

Commit

Permalink
feat: Update deps + fix warnings;
Browse files Browse the repository at this point in the history
  • Loading branch information
mat1th committed Jan 24, 2025
1 parent acf009d commit 303bcd2
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 33 deletions.
41 changes: 20 additions & 21 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ analyzer_rules:
- unused_import

opt_in_rules:
- anyobject_protocol
- array_init
- attributes
- closure_end_indentation
Expand Down Expand Up @@ -70,38 +69,38 @@ opt_in_rules:
- yoda_condition

excluded:
- build
- .build
- DerivedData
- Release
- build
- .build
- DerivedData
- Release

line_length:
warning: 150
error: 200
ignores_function_declarations: true
ignores_comments: true
ignores_urls: true
warning: 150
error: 200
ignores_function_declarations: true
ignores_comments: true
ignores_urls: true

function_body_length:
warning: 300
error: 500
warning: 300
error: 500

function_parameter_count:
warning: 6
error: 8
warning: 6
error: 8

type_body_length:
warning: 300
error: 500
warning: 300
error: 500

file_length:
warning: 1000
error: 1500
ignore_comment_only_lines: true
warning: 1000
error: 1500
ignore_comment_only_lines: true

cyclomatic_complexity:
warning: 15
error: 25
warning: 15
error: 25

identifier_name:
min_length:
Expand Down
28 changes: 16 additions & 12 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
// swift-tools-version:5.6
// swift-tools-version:5.10

import PackageDescription

let package = Package(
name: "Unlocker",
platforms: [
.macOS(.v10_13)
.macOS(.v10_13),
],
products: [
.executable(name: "unlocker", targets: ["unlocker"]),
.library(name: "UnlockerCore", targets: ["UnlockerCore"])
.library(name: "UnlockerCore", targets: ["UnlockerCore"]),
],
dependencies: [
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.3.0")
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.5.0"),
],
targets: [
.executableTarget(
name: "unlocker",
dependencies: [
.product(name: "ArgumentParser", package: "swift-argument-parser"),
"UnlockerCore",
"SwiftLintPlugin"
"SwiftLintPlugin",
],
swiftSettings: [
// Enable to validate if project is compatible with swift 6.0 Concurrency
.enableExperimentalFeature("StrictConcurrency"),
]
),
.target(
Expand All @@ -30,18 +34,18 @@ let package = Package(
.testTarget(
name: "UnlockerCoreTests",
dependencies: [
"UnlockerCore"
"UnlockerCore",
]
),
.binaryTarget(
name: "SwiftLintBinary",
url: "https://github.com/realm/SwiftLint/releases/download/0.49.0/SwiftLintBinary-macos.artifactbundle.zip",
checksum: "89e427517d6f999e025fccd48696e67bdf2d76e9e0804d115beca169c5019685"
url: "https://github.com/realm/SwiftLint/releases/download/0.58.2/SwiftLintBinary.artifactbundle.zip",
checksum: "f2de7c148dba39bf0ad55ada8f60b15dde383c643c69f7eb2448bd2ed532f659"
),
.plugin(
name: "SwiftLintPlugin",
capability: .buildTool(),
dependencies: ["SwiftLintBinary"]
)
name: "SwiftLintPlugin",
capability: .buildTool(),
dependencies: ["SwiftLintBinary"]
),
]
)
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Foundation
import Quartz
import ServiceManagement

// swiftlint:disable:next type_name
public protocol AccessablityPermissionIsAllowedUseCaseProtocol {
func execute() -> Bool
}
Expand Down

0 comments on commit 303bcd2

Please sign in to comment.