Skip to content

Commit 27d4f4c

Browse files
committed
finishing linting
1 parent 30247cb commit 27d4f4c

File tree

56 files changed

+507
-241
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+507
-241
lines changed

.swiftlint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ type_body_length:
9999
- 125
100100
- 200
101101
file_length:
102-
- 200
103102
- 250
103+
- 300
104104
function_body_length:
105105
- 25
106106
- 35

Sources/RadiantDocs/Actions/OpenFileURLAction.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
public import Foundation
3434
public import SwiftUI
3535

36-
/// A private environment key for storing the `OpenFileURLAction` in the environment.
36+
/// A private environment key for storing the `OpenFileURLAction` in the
37+
/// environment.
3738
private struct OpenFileURLKey: EnvironmentKey, Sendable {
3839
typealias Value = OpenFileURLAction
3940

@@ -46,7 +47,8 @@
4647
/// A type alias for opening files with URLs.
4748
public typealias OpenFileURLAction = OpenWindowURLAction
4849

49-
/// Environment values extension that provides access to the file URL opening action.
50+
/// Environment values extension that provides access to the file URL opening
51+
/// action.
5052
extension EnvironmentValues {
5153
/// The action used to open file URLs in the current environment.
5254
public var openFileURL: OpenFileURLAction {

Sources/RadiantDocs/Actions/OpenWindowWithAction.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
/// A type alias for opening windows without an associated value.
3838
public typealias OpenWindowWithAction = OpenWindowWithValueAction<Void>
3939

40-
/// Extension providing functionality for opening windows without associated values.
40+
/// Extension providing functionality for opening windows without associated
41+
/// values.
4142
@MainActor
4243
extension OpenWindowWithAction {
4344
/// Creates a new window opening action with the specified closure.

Sources/RadiantDocs/Actions/OpenWindowWithValueAction.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@
4545

4646
/// Initializes a new instance of `OpenWindowWithValueAction`.
4747
///
48-
/// - Parameter closure: The closure to be executed when the action is called.
48+
/// - Parameter closure: The closure to be executed when the action is
49+
/// called.
4950
public init(
5051
closure: @escaping @MainActor @Sendable (ValueType, OpenWindowAction) -> Void
5152
) {

Sources/RadiantDocs/AllowedOpenFileTypesKey.swift

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535

3636
import UniformTypeIdentifiers
3737

38-
/// A private struct that represents the environment key for allowed open file types.
38+
/// A private struct that represents the environment key for allowed open file
39+
/// types.
3940
private struct AllowedOpenFileTypesKey: EnvironmentKey {
4041
/// The value type associated with the environment key.
4142
typealias Value = [FileType]
@@ -56,7 +57,8 @@
5657
///
5758
/// - Parameter fileTypes: The array of `FileType` values
5859
/// to be allowed for file opening.
59-
/// - Returns: A modified version of the view with the allowed open file types set.
60+
/// - Returns: A modified version of the view with the allowed open file
61+
/// types set.
6062
public func allowedOpenFileTypes(_ fileTypes: [FileType]) -> some View {
6163
self.environment(\.allowedOpenFileTypes, fileTypes)
6264
}
@@ -67,7 +69,8 @@
6769
///
6870
/// - Parameter fileTypes: The array of `FileType` values
6971
/// to be allowed for file opening.
70-
/// - Returns: A modified version of the scene with the allowed open file types set.
72+
/// - Returns: A modified version of the scene with the allowed open file
73+
/// types set.
7174
public func allowedOpenFileTypes(_ fileTypes: [FileType]) -> some Scene {
7275
self.environment(\.allowedOpenFileTypes, fileTypes)
7376
}

Sources/RadiantDocs/AppKit/NewFilePanel.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@
4848

4949
/// Presents a new file panel and opens a window with the created file.
5050
///
51-
/// - Parameter openWindow: The action to be performed when a new file is created.
51+
/// - Parameter openWindow: The action to be performed when a new file is
52+
/// created.
5253
@MainActor
5354
public func callAsFunction(with openWindow: OpenWindowAction) {
5455
let openPanel = NSSavePanel()

Sources/RadiantDocs/AppKit/OpenAnyFilePanel.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
/// The file types that the file panel should allow.
4343
private let fileTypes: [FileType]
4444

45-
/// Initializes a new instance of `OpenAnyFilePanel` with the specified file types.
45+
/// Initializes a new instance of `OpenAnyFilePanel` with the specified file
46+
/// types.
4647
///
4748
/// - Parameter fileTypes: An array of `FileType` objects
4849
/// representing the file types to allow in the file panel.
@@ -55,7 +56,7 @@
5556
/// with the selected file URL and the `OpenWindowAction`.
5657
///
5758
/// - Parameters:
58-
/// - openFileURL: The `OpenFileURLAction` to call with the selected file URL
59+
/// - openFileURL: The `OpenFileURLAction` to call with the selected file URL
5960
/// and the `OpenWindowAction`.
6061
/// - openWindow: The `OpenWindowAction` to use when opening the file.
6162
@MainActor
@@ -77,7 +78,8 @@
7778

7879
extension OpenFileURLAction {
7980
/// Displays a file panel with the specified file types and
80-
/// calls the provided `OpenFileURLAction` with the selected file URL and the `OpenWindowAction`.
81+
/// calls the provided `OpenFileURLAction` with the selected file URL and the
82+
/// `OpenWindowAction`.
8183
///
8284
/// - Parameters:
8385
/// - fileTypes: An array of `FileType` objects representing

Sources/RadiantDocs/AppKit/OpenFilePanel.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@
5050
/// Calls the open file panel and
5151
/// passes the selected file to the provided `OpenWindowAction`.
5252
///
53-
/// - Parameter openWindow: The action to be performed with the selected file.
53+
/// - Parameter openWindow: The action to be performed with the selected
54+
/// file.
5455
@MainActor
5556
public func callAsFunction(with openWindow: OpenWindowAction) {
5657
let openPanel = NSOpenPanel()

Sources/RadiantDocs/CodablePackageDocument.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@
5757
self.configuration = configuration
5858
}
5959

60-
/// Initializes a `CodablePackageDocument` from the provided read configuration.
60+
/// Initializes a `CodablePackageDocument` from the provided read
61+
/// configuration.
6162
/// - Parameter configuration: The read configuration.
6263
/// - Throws: A `ReadError` if the configuration file wrapper is missing.
6364
public init(configuration: ReadConfiguration) throws {

Sources/RadiantDocs/Primitives/DocumentFile.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ extension DocumentFile {
4747
/// Creates a `DocumentFile` instance from the given URL
4848
/// if the file type matches the specified `FileType`.
4949
/// - Parameter url: The URL of the document file.
50-
/// - Returns: A `DocumentFile` instance if the file type matches, or `nil` if it does not.
50+
/// - Returns: A `DocumentFile` instance if the file type matches, or `nil` if
51+
/// it does not.
5152
public static func documentFile(from url: URL) -> Self? {
5253
guard url.pathExtension == FileType.fileType.fileExtension else {
5354
return nil

0 commit comments

Comments
 (0)