Skip to content

Commit

Permalink
Update DocC curation for newest symbols (#507)
Browse files Browse the repository at this point in the history
  • Loading branch information
natecook1000 committed Oct 14, 2022
1 parent b99e170 commit f8b5e71
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 19 deletions.
18 changes: 13 additions & 5 deletions Sources/ArgumentParser/Documentation.docc/Extensions/Argument.md
Expand Up @@ -4,11 +4,20 @@

### Single Arguments

- ``init(help:completion:)-6pqzn``
- ``init(help:completion:transform:)``
- ``init(help:completion:)-6mld0``
- ``init(help:completion:)-4p94d``
- ``init(wrappedValue:help:completion:)``
- ``init(wrappedValue:help:completion:transform:)``
- ``init(help:completion:transform:)-3fjtc``
- ``init(help:completion:transform:)-7yn32``

@Comment {
The following symbols are copied from the preview website, but give a warning
when built and don't show up in this section in the rendered navigation in
either Xcode or the preview website. Instead, these symbols end up in the
default-generated Initializers section.
}

- ``init(wrappedvalue:help:completion:)``
- ``init(wrappedvalue:help:completion:transform:)``

### Array Arguments

Expand All @@ -20,6 +29,5 @@

### Infrequently Used APIs

- ``init()``
- ``init(from:)``
- ``wrappedValue``
@@ -0,0 +1,14 @@
# ``ArgumentParser/ArgumentArrayParsingStrategy``

## Topics

### Parsing Strategies

- ``remaining``
- ``allUnrecognized``
- ``postTerminator``
- ``captureForPassthrough``

### Deprecated

- ``unconditionalRemaining``
4 changes: 0 additions & 4 deletions Sources/ArgumentParser/Documentation.docc/Extensions/Flag.md
Expand Up @@ -33,7 +33,3 @@
### Supporting Types

- ``FlagExclusivity``

### Deprecated APIs

- ``init()``
28 changes: 25 additions & 3 deletions Sources/ArgumentParser/Documentation.docc/Extensions/Option.md
Expand Up @@ -4,13 +4,28 @@

### Single Options

- ``init(name:parsing:help:completion:)-4yske``
- ``init(name:parsing:help:completion:)-7slrf``
- ``init(name:parsing:help:completion:)-5k0ug``
- ``init(name:parsing:help:completion:transform:)-2wf44``
- ``init(wrappedValue:name:parsing:help:completion:)-7ilku``
- ``init(name:parsing:help:completion:transform:)-25g7b``
- ``init(wrappedValue:name:parsing:help:completion:transform:)-2llve``
- ``SingleValueParsingStrategy``

@Comment {
This gives a warning and doesn't show up here, but doesn't show up in the
Initializers section, either. If I omit it here, then it shows up in the
Initializers section.
}

- ``init(wrappedValue:name:parsing:help:completion:)-7ilku``

@Comment {
This gives a warning and doesn't show up here, but is in the Initializers
section.
}

- ``init(wrappedvalue:name:parsing:help:completion:)-7xcum``

### Array Options

- ``init(name:parsing:help:completion:)-238hg``
Expand All @@ -21,10 +36,17 @@

### Infrequently Used APIs

- ``init()``
- ``init(from:)``
- ``wrappedValue``

### Deprecated APIs

- ``init(wrappedValue:name:parsing:completion:help:)``

@Comment {
These give a warning and don't show up here, but are in the Initializers
section.
}

- ``init(wrappedvalue:name:parsing:help:completion:)-4pl7h``
- ``init(wrappedvalue:name:parsing:help:completion:transform:)-6rqji``
Expand Up @@ -4,7 +4,11 @@

### Creating an Option Group

- ``init(visibility:)``
- ``init(title:visibility:)``

### Option Group Properties

- ``title``

### Infrequently Used APIs

Expand Down
Expand Up @@ -33,3 +33,4 @@
### Infrequently Used APIs

- ``init()``
- ``helpMessage(columns:)``
8 changes: 4 additions & 4 deletions Sources/ArgumentParser/Parsable Properties/Argument.swift
Expand Up @@ -460,7 +460,7 @@ extension Argument {
Optional @Arguments with default values should be declared as non-Optional.
""")
public init<T>(
wrappedValue: Optional<T>,
wrappedValue _wrappedValue: Optional<T>,
help: ArgumentHelp? = nil,
completion: CompletionKind? = nil
) where T: ExpressibleByArgument, Value == Optional<T> {
Expand All @@ -471,7 +471,7 @@ extension Argument {
kind: .positional,
help: help,
parsingStrategy: .default,
initial: wrappedValue,
initial: _wrappedValue,
completion: completion)

return ArgumentSet(arg)
Expand Down Expand Up @@ -541,7 +541,7 @@ extension Argument {
Optional @Arguments with default values should be declared as non-Optional.
""")
public init<T>(
wrappedValue: Optional<T>,
wrappedValue _wrappedValue: Optional<T>,
help: ArgumentHelp? = nil,
completion: CompletionKind? = nil,
transform: @escaping (String) throws -> T
Expand All @@ -554,7 +554,7 @@ extension Argument {
help: help,
parsingStrategy: .default,
transform: transform,
initial: wrappedValue,
initial: _wrappedValue,
completion: completion)

return ArgumentSet(arg)
Expand Down
4 changes: 2 additions & 2 deletions Sources/ArgumentParser/Parsable Types/ParsableCommand.swift
Expand Up @@ -82,10 +82,10 @@ extension ParsableCommand {
@_disfavoredOverload
@available(*, deprecated, renamed: "helpMessage(for:includeHidden:columns:)")
public static func helpMessage(
for subcommand: ParsableCommand.Type,
for _subcommand: ParsableCommand.Type,
columns: Int? = nil
) -> String {
helpMessage(for: subcommand, includeHidden: false, columns: columns)
helpMessage(for: _subcommand, includeHidden: false, columns: columns)
}

/// Returns the text of the help screen for the given subcommand of this
Expand Down

0 comments on commit f8b5e71

Please sign in to comment.