Skip to content

[docs] Elaborated on documentation for Configuration.testFilter#1638

Closed
truman-404 wants to merge 1 commit intoswiftlang:mainfrom
truman-404:fix/known-issue-comment-encoding
Closed

[docs] Elaborated on documentation for Configuration.testFilter#1638
truman-404 wants to merge 1 commit intoswiftlang:mainfrom
truman-404:fix/known-issue-comment-encoding

Conversation

@truman-404
Copy link

Elaborated the doc comment for 'Configuration.testFilter' to clarify the default behaviour and distinguish it from 'testCaseFilter'

Motivation:

The 'testFilter' property had a single-line doc comment whilst comparable properties in 'Configuration' have detailed documentation including notes, cross-references, and usage guidance. This makes it harder for developers to understand the default '.unfiltered' behaviour and when to use 'testFilter' vs 'testCaseFilter' for parameterised tests.

Modifications:

  • Clarified that '.unfiltered' includes all tests in the run
  • Explained how to construct a 'TestFilter' with testIDs, tags, or patterns
  • Add a note distinguishing 'testFilter' from 'testCaseFilter'

Checklist:

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

@grynspan
Copy link
Contributor

Did you use an LLM or AI to write this text?

// MARK: - Test selection

/// The test filter to which tests should be filtered when run.
///
Copy link
Contributor

Choose a reason for hiding this comment

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

Please ensure text is formatted according to our style guide and so that it is correctly rendered by the DocC compiler.

@grynspan grynspan added documentation 📚 Improvements or additions to documentation tools integration 🛠️ Integration of swift-testing into tools/IDEs labels Mar 20, 2026
@truman-404
Copy link
Author

hey, yeah i did utilise llms to help me since i was struggling with the phrasing of the doc, I heavily apologise for it and make sure that the issue was found organically. I will push a manual written, well formatted update shortly.

@grynspan
Copy link
Contributor

As testFilter is not public-facing API and is not used "in the wild", I would not expect an LLM to be able to produce meaningful or useful documentation for it.

The documentation for the TestFilter type itself should be sufficient for developers interested in using this SPI in their projects. As such, I'm closing this PR. Please feel free to contribute in the future, but please also understand that documentation changes in particular will benefit from human oversight and need to be reviewed carefully for correctness and usefulness.

@grynspan grynspan closed this Mar 20, 2026
@truman-404
Copy link
Author

thank you for the feedback on documentation standards, and i understand the criticality of manual oversight. I will keep it in mind for future contributions. Thanks for your time :)

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

Labels

documentation 📚 Improvements or additions to documentation tools integration 🛠️ Integration of swift-testing into tools/IDEs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants