Skip to content

Commit dbe46d1

Browse files
authored
Merge branch 'main' into list_102987273
2 parents 8ae873a + c2e7096 commit dbe46d1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1872
-1660
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
*.md linguist-detectable=true
22
*.md linguist-documentation=false
3+
*.md diff=markdown

CONTRIBUTING.md

Lines changed: 77 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,97 @@ and agree by submitting the patch
77
that your contributions are licensed under
88
the [Swift license](https://swift.org/LICENSE.txt).
99

10-
For now,
11-
we’re expecting most pull requests to be enhancements and bug fixes
12-
to support the Swift-DocC publication,
13-
with only minor content changes.
14-
1510
For small changes,
16-
like typo fixes and changes to a few paragraphs,
17-
fork this repository and make a pull request.
18-
19-
A formal contribution process for this document is still in development.
20-
In the meantime,
21-
start a thread in the [Swift forums][forum] for larger changes
11+
like typo fixes and revisions within a few paragraphs,
12+
the discussion of those changes is usually small enough
13+
to be part of the pull request.
14+
For large changes,
15+
like new chapters and sections,
16+
start a thread in the [Swift forums][forum]
2217
to discuss your approach and identify possible issues
2318
before you invest a lot of time in writing.
19+
In general,
20+
the amount of discussion around a change before making a pull request
21+
corresponds to the size of that change.
2422

2523
Content in this book follows [Apple Style Guide][asg]
2624
and [this book’s style guide][tspl-style].
2725

2826
[asg]: https://help.apple.com/applestyleguide/
29-
[forum]: https://forums.swift.org/c/development/swift-docc/80
27+
[forum]: https://forums.swift.org/c/swift-documentation/92
3028
[tspl-style]: /Style.md
3129

30+
## Working on a feature branch
31+
32+
If this is your first contribution,
33+
start by making a fork of the Git repository.
34+
35+
In your fork,
36+
make a new branch starting at `main`
37+
with a brief, descriptive name.
38+
Branch names are ephemeral:
39+
When a pull request is merged,
40+
the merge commit doesn’t include name of your feature branch.
41+
42+
If you need to incorporate changes from `main` or resolve a merge conflict,
43+
merge `main` into your feature branch.
44+
Before creating a pull request,
45+
you can instead rebase your feature branch onto `main` if you prefer,
46+
but don't rebase commits that are part of a pull request.
47+
48+
## Writing commit messages
49+
50+
Use the Git commit message to communicate with other contributors --
51+
both the people working on the project now
52+
who are reviewing your changes,
53+
and people who join the project in the future
54+
who will need to understand what you changed and why.
55+
56+
Every commit starts with a one-sentence summary.
57+
The summary usually fits in 50 characters,
58+
but it's ok to exceed that amount occasionally
59+
if rewriting for brevity would make it too hard to read.
60+
If it's hard to write a good summary,
61+
try breaking your changes into multiple smaller commits.
62+
63+
If you can't explain the commit entirely in its summary,
64+
skip one line and add additional information.
65+
This additional information includes information like
66+
the reasons for the change,
67+
the approach you took when making it,
68+
alternatives you considered,
69+
and a summary of what you changed.
70+
Hard wrap these lines at 72 characters
71+
and leave a blank line between paragraphs.
72+
The body of a commit is plain text,
73+
not markdown like the content of the book.
74+
75+
Following these formatting conventions in your commit
76+
makes it easier to read
77+
in places like the output from `git` and notification emails.
78+
Most text editors can help you write a commit message
79+
by marking lines that are too long
80+
and hard wrapping text automatically.
81+
3282
## Submitting a pull request
3383

3484
Use the following steps when creating a new pull request:
3585

36-
1. Create a local fork of this repository with your changes.
37-
2. Test that your changes build locally by running `make preview`.
38-
3. Create a pull request in this repository.
86+
1. Test that your changes build locally by running `make preview`.
87+
2. Create a pull request in this repository.
88+
3. Write a brief message in the pull request to introduce your work in context.
3989

4090
Within a few days,
4191
someone will assign reviewers and start a build in CI.
92+
93+
During the review of the pull request,
94+
add new commits on your branch to incorporate feedback,
95+
but don’t rebase or force push.
96+
Rewriting the branch's history
97+
makes it hard for reviewers to see
98+
what changed since the last time they reviewed your changes.
99+
If there are merge conflicts,
100+
merge `main` into your branch or use the GitHub web UI
101+
to resolve the conflicts when accepting the pull request.
102+
103+
After a pull request is merged, delete the feature branch.

Sources/TSPL/TSPL.docc/GuidedTour/Compatibility.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ that are written in either Swift 5.7, Swift 4.2, or Swift 4.
99

1010
<!--
1111
- test: `swift-version`
12-
12+
1313
```swifttest
1414
>> #if swift(>=5.7.1)
1515
>> print("Too new")

0 commit comments

Comments
 (0)