File tree 1 file changed +26
-0
lines changed
1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 1
1
# Developing ` swift-format `
2
2
3
+ ## Keeping the Pipeline and Tests Updated
4
+
5
+ Since Swift does not yet have a runtime reflection system, we use code
6
+ generation to keep the linting/formatting pipeline up-to-date. If you add or
7
+ remove any rules from the ` SwiftFormatRules ` module, or if you add or remove
8
+ any ` visit ` methods from an existing rule in that module, you must run the
9
+ ` generate-pipeline ` tool update the pipeline and configuration sources.
10
+
11
+ The easiest way to do this is to run the following command in your terminal:
12
+
13
+ ``` shell
14
+ swift run generate-pipeline
15
+ ```
16
+
17
+ If successful, this tool will update
18
+ ` Sources/SwiftFormatConfiguration/RuleRegistry+Generated.swift ` and
19
+ ` Sources/SwiftFormat/Pipelines+Generated.swift ` .
20
+
21
+ Likewise, you should keep the Linux XCTest manifests updated if you add or
22
+ remove any tests from ` swift-format ` by running the following command in your
23
+ terminal:
24
+
25
+ ``` shell
26
+ swift test --generate-linuxmain
27
+ ```
28
+
3
29
## Command Line Options for Debugging
4
30
5
31
` swift-format ` provides some hidden command line options to facilitate
You can’t perform that action at this time.
0 commit comments