Skip to content

Rename generate-pipeline to generate-swift-format. #638

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Documentation/Development.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ Since Swift does not yet have a runtime reflection system, we use code
generation to keep the linting/formatting pipeline up-to-date. If you add or
remove any rules from the `SwiftFormat` module, or if you add or remove
any `visit` methods from an existing rule in that module, you must run the
`generate-pipeline` tool update the pipeline and configuration sources.
`generate-swift-format` tool update the pipeline and configuration sources.

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

```shell
swift run generate-pipeline
swift run generate-swift-format
```

If successful, this tool will update the files `Pipelines+Generated.swift`,
Expand Down
5 changes: 2 additions & 3 deletions Documentation/RuleDocumentation.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<!-- This file is autogenerated with `generate-pipeline` utility of
`swift-format`. DO NOT EDIT MANUALLY! -->
<!-- This file is automatically generated with generate-swift-format. Do not edit! -->

# `swift-format` Lint and Format Rules

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

Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ let package = Package(
path: "Plugins/LintPlugin"
),
.executableTarget(
name: "generate-pipeline",
name: "generate-swift-format",
dependencies: [
"SwiftFormat",
.product(name: "SwiftSyntax", package: "swift-syntax"),
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftFormat/API/Configuration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public struct Configuration: Codable, Equatable {
/// A dictionary containing the default enabled/disabled states of rules, keyed by the rules'
/// names.
///
/// This value is generated by `generate-pipeline` based on the `isOptIn` value of each rule.
/// This value is generated by `generate-swift-format` based on the `isOptIn` value of each rule.
public static let defaultRuleEnablements: [String: Bool] = RuleRegistry.rules

/// The version of this configuration.
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftFormat/Core/Context.swift
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public final class Context {
ruleNameCache[ObjectIdentifier(rule)] != nil,
"""
Missing cached rule name for '\(rule)'! \
Ensure `generate-pipelines` has been run and `ruleNameCache` was injected.
Ensure `generate-swift-format` has been run and `ruleNameCache` was injected.
""")

let ruleName = ruleNameCache[ObjectIdentifier(rule)] ?? R.ruleName
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftFormat/Core/Pipelines+Generated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//
//===----------------------------------------------------------------------===//

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

import SwiftSyntax

Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftFormat/Core/RuleNameCache+Generated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//
//===----------------------------------------------------------------------===//

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

/// By default, the `Rule.ruleName` should be the name of the implementing rule type.
@_spi(Testing)
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftFormat/Core/RuleRegistry+Generated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//
//===----------------------------------------------------------------------===//

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

@_spi(Internal) public enum RuleRegistry {
public static let rules: [String: Bool] = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ final class PipelineGenerator: FileGenerator {
//
//===----------------------------------------------------------------------===//

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

import SwiftSyntax

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ final class RuleDocumentationGenerator: FileGenerator {
func write(into handle: FileHandle) throws {
handle.write(
"""
<!-- This file is autogenerated with `generate-pipeline` utility of
`swift-format`. DO NOT EDIT MANUALLY! -->
<!-- This file is automatically generated with generate-swift-format. Do not edit! -->

# `swift-format` Lint and Format Rules

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ final class RuleNameCacheGenerator: FileGenerator {
//
//===----------------------------------------------------------------------===//

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

/// By default, the `Rule.ruleName` should be the name of the implementing rule type.
@_spi(Testing)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ final class RuleRegistryGenerator: FileGenerator {
//
//===----------------------------------------------------------------------===//

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

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