Skip to content

Consistently use kebab-case filenames for DocC articles#1765

Open
stmontgomery wants to merge 1 commit into
swiftlang:mainfrom
stmontgomery:kebab-case-articles
Open

Consistently use kebab-case filenames for DocC articles#1765
stmontgomery wants to merge 1 commit into
swiftlang:mainfrom
stmontgomery:kebab-case-articles

Conversation

@stmontgomery

Copy link
Copy Markdown
Contributor

Rename the DocC article files in Testing.docc which currently use UpperCamelCase to use kebab-case instead, for the reasons explained in our style guide.

Fixes #1758

Checklist:

  • Code and documentation should follow the style of the Style Guide.
  • If public symbols are renamed or modified, DocC references should be updated.

@stmontgomery stmontgomery added this to the Swift 6.5.0 (main) milestone Jun 19, 2026
@stmontgomery stmontgomery self-assigned this Jun 19, 2026
@stmontgomery stmontgomery added bug 🪲 Something isn't working documentation 📚 Improvements or additions to documentation labels Jun 19, 2026
@stmontgomery stmontgomery requested a review from mreid10 June 19, 2026 18:08

@mreid10 mreid10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the example given in the style guide, the kebab case filenames should align with the titles of the pages, most of my comments/suggestions are to get there.

For the files that we're changing the name of, we should also add @Redirected directives with the old path. For example, the Associating bugs with tests article which had the filename AssociatingBugs.md should have a redirected directive:

@Redirected(from:"documentation/testing/AssociatingBugs")

See https://swift.org/LICENSE.txt for license information
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
-->

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can also add a @Redirected directive to all the renamed files so DocC recognizes references to the old filename that we may have missed:

Suggested change
@Redirected(from:"documentation/testing/AddingComments")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following the example in the style guide, the filename should match the title of the page, so adding-comments-to-tests.md.

From the style guide:

For example, if the title of your article is Adding tags to tests, the
filename would be adding-tags-to-tests.md, or if the title of the collection
page is Event tags, the filename would be event-tags.md.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As explained above, this should be adding-tags-to-tests.md.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As explained above, this should be associating-bugs-with-tests.md.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As explained above, this should be interpreting-bug-identifiers.md.

By default, the test cases of a test function run in parallel with each
other. For more information about test parallelization, see
<doc:Parallelization>.
<doc:parallelization>.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<doc:parallelization>.
<doc:running-tests-serially-or-in-parallel>.

Comment on lines +840 to +842
- <doc:defining-tests>
- <doc:organizing-tests>
- <doc:expectations>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- <doc:defining-tests>
- <doc:organizing-tests>
- <doc:expectations>
- <doc:defining-test-functions>
- <doc:organizing-test-functions-with-suite-types>
- <doc:expectations-and-confirmations>

}

For more information, see <doc:Parallelization>.
For more information, see <doc:parallelization>.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For more information, see <doc:parallelization>.
For more information, see <doc:running-tests-serially-or-in-parallel>.


If a test is related to a bug or issue, consider using the ``Bug`` trait instead
of comments. For more information, see <doc:AssociatingBugs>.
of comments. For more information, see <doc:associating-bugs>.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
of comments. For more information, see <doc:associating-bugs>.
of comments. For more information, see <doc:associating-bugs-with-tests>.

[RFC&nbsp;3986](https://www.ietf.org/rfc/rfc3986.txt). A bug's unique identifier
can be passed as an integer or as a string. For more information on the formats
recognized by the testing library, see <doc:BugIdentifiers>.
recognized by the testing library, see <doc:bug-identifiers>.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
recognized by the testing library, see <doc:bug-identifiers>.
recognized by the testing library, see <doc:interpreting-bug-identifiers>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 🪲 Something isn't working documentation 📚 Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consistently use kebab-case filenames for DocC articles

2 participants