Skip to content

Commit 6ebcfcd

Browse files
authored
Merge pull request #638 from allevato/generate-rename
Rename `generate-pipeline` to `generate-swift-format`.
2 parents 4479062 + 7e4c06a commit 6ebcfcd

16 files changed

+14
-16
lines changed

Documentation/Development.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ Since Swift does not yet have a runtime reflection system, we use code
66
generation to keep the linting/formatting pipeline up-to-date. If you add or
77
remove any rules from the `SwiftFormat` module, or if you add or remove
88
any `visit` methods from an existing rule in that module, you must run the
9-
`generate-pipeline` tool update the pipeline and configuration sources.
9+
`generate-swift-format` tool update the pipeline and configuration sources.
1010

1111
The easiest way to do this is to run the following command in your terminal:
1212

1313
```shell
14-
swift run generate-pipeline
14+
swift run generate-swift-format
1515
```
1616

1717
If successful, this tool will update the files `Pipelines+Generated.swift`,

Documentation/RuleDocumentation.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
<!-- This file is autogenerated with `generate-pipeline` utility of
2-
`swift-format`. DO NOT EDIT MANUALLY! -->
1+
<!-- This file is automatically generated with generate-swift-format. Do not edit! -->
32

43
# `swift-format` Lint and Format Rules
54

65
Use the rules below in the `rules` block of your `.swift-format`
76
configuration file, as described in
8-
[Configuration](Configuration.md). All of these rules can be
7+
[Configuration](Documentation/Configuration.md). All of these rules can be
98
applied in the linter, but only some of them can format your source code
109
automatically.
1110

Package.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ let package = Package(
9191
path: "Plugins/LintPlugin"
9292
),
9393
.executableTarget(
94-
name: "generate-pipeline",
94+
name: "generate-swift-format",
9595
dependencies: [
9696
"SwiftFormat",
9797
.product(name: "SwiftSyntax", package: "swift-syntax"),

Sources/SwiftFormat/API/Configuration.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public struct Configuration: Codable, Equatable {
4848
/// A dictionary containing the default enabled/disabled states of rules, keyed by the rules'
4949
/// names.
5050
///
51-
/// This value is generated by `generate-pipeline` based on the `isOptIn` value of each rule.
51+
/// This value is generated by `generate-swift-format` based on the `isOptIn` value of each rule.
5252
public static let defaultRuleEnablements: [String: Bool] = RuleRegistry.rules
5353

5454
/// The version of this configuration.

Sources/SwiftFormat/Core/Context.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public final class Context {
9494
ruleNameCache[ObjectIdentifier(rule)] != nil,
9595
"""
9696
Missing cached rule name for '\(rule)'! \
97-
Ensure `generate-pipelines` has been run and `ruleNameCache` was injected.
97+
Ensure `generate-swift-format` has been run and `ruleNameCache` was injected.
9898
""")
9999

100100
let ruleName = ruleNameCache[ObjectIdentifier(rule)] ?? R.ruleName

Sources/SwiftFormat/Core/Pipelines+Generated.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
// This file is automatically generated with generate-pipeline. Do Not Edit!
13+
// This file is automatically generated with generate-swift-format. Do not edit!
1414

1515
import SwiftSyntax
1616

Sources/SwiftFormat/Core/RuleNameCache+Generated.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
// This file is automatically generated with generate-pipeline. Do Not Edit!
13+
// This file is automatically generated with generate-swift-format. Do not edit!
1414

1515
/// By default, the `Rule.ruleName` should be the name of the implementing rule type.
1616
@_spi(Testing)

Sources/SwiftFormat/Core/RuleRegistry+Generated.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
// This file is automatically generated with generate-pipeline. Do Not Edit!
13+
// This file is automatically generated with generate-swift-format. Do not edit!
1414

1515
@_spi(Internal) public enum RuleRegistry {
1616
public static let rules: [String: Bool] = [

Sources/generate-pipeline/PipelineGenerator.swift renamed to Sources/generate-swift-format/PipelineGenerator.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ final class PipelineGenerator: FileGenerator {
3838
//
3939
//===----------------------------------------------------------------------===//
4040
41-
// This file is automatically generated with generate-pipeline. Do Not Edit!
41+
// This file is automatically generated with generate-swift-format. Do not edit!
4242
4343
import SwiftSyntax
4444

Sources/generate-pipeline/RuleDocumentationGenerator.swift renamed to Sources/generate-swift-format/RuleDocumentationGenerator.swift

+1-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ final class RuleDocumentationGenerator: FileGenerator {
2727
func write(into handle: FileHandle) throws {
2828
handle.write(
2929
"""
30-
<!-- This file is autogenerated with `generate-pipeline` utility of
31-
`swift-format`. DO NOT EDIT MANUALLY! -->
30+
<!-- This file is automatically generated with generate-swift-format. Do not edit! -->
3231
3332
# `swift-format` Lint and Format Rules
3433

Sources/generate-pipeline/RuleNameCacheGenerator.swift renamed to Sources/generate-swift-format/RuleNameCacheGenerator.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ final class RuleNameCacheGenerator: FileGenerator {
3838
//
3939
//===----------------------------------------------------------------------===//
4040
41-
// This file is automatically generated with generate-pipeline. Do Not Edit!
41+
// This file is automatically generated with generate-swift-format. Do not edit!
4242
4343
/// By default, the `Rule.ruleName` should be the name of the implementing rule type.
4444
@_spi(Testing)

Sources/generate-pipeline/RuleRegistryGenerator.swift renamed to Sources/generate-swift-format/RuleRegistryGenerator.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ final class RuleRegistryGenerator: FileGenerator {
3838
//
3939
//===----------------------------------------------------------------------===//
4040
41-
// This file is automatically generated with generate-pipeline. Do Not Edit!
41+
// This file is automatically generated with generate-swift-format. Do not edit!
4242
4343
@_spi(Internal) public enum RuleRegistry {
4444
public static let rules: [String: Bool] = [

0 commit comments

Comments
 (0)