Skip to content

Commit 219f29a

Browse files
committed
Rename 'isAcceptedBy(_:)' to 'isAccepted(by:)'.
This PR applies method naming conventions to `Option.isAcceptedBy(_:)`, move preposition "by" from the base name to the first argument label. Also fixes some unfinished documentation comments.
1 parent 92e6773 commit 219f29a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Sources/SwiftDriver/Driver/DriverKind.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
1010
//
1111
//===----------------------------------------------------------------------===//
12-
/// Describes which mode the driver is in, which dictates
12+
13+
/// Describes which mode the driver is in.
1314
public enum DriverKind {
1415
case interactive
1516
case batch

Sources/SwiftDriver/Options/Option.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ extension Option {
130130
}
131131

132132
extension Option {
133-
/// Whether this option is accepted by the
134-
public func isAcceptedBy(_ driverKind: DriverKind) -> Bool {
133+
/// Whether this option is accepted by a driver of the given kind.
134+
public func isAccepted(by driverKind: DriverKind) -> Bool {
135135
switch driverKind {
136136
case .autolinkExtract:
137137
return attributes.contains(.autolinkExtract)

0 commit comments

Comments
 (0)