Skip to content
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

Add "nodoc" annotation #3978

Merged
merged 1 commit into from
Feb 1, 2022
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
7 changes: 7 additions & 0 deletions .release-notes/nodoc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Add "nodoc" annotation

The can be used to control the pony compilers documentation generation, any structure that can have a docstring (except packages) can be annotated with \nodoc\ to prevent documentation from being generated.

This replaces a hack that has existed in the documentation generation system for several years to filter out items that were "for testing" by looking for Test and _Test at the beginning of the name as well as providing UnitTest or TestList.

Note that the "should we include this package" hack to filter oupackages called "test" and "builtin_test" still exists for the timbeing until we have further discussion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ All notable changes to the Pony compiler and standard library will be documented
- Remove library mode option from ponyc ([PR #3975](https://github.com/ponylang/ponyc/pull/3975))
- Change `builtin/AsioEventNotify` from an interface to a trait ([PR #3973](https://github.com/ponylang/ponyc/pull/3973))
- Don't allow interfaces to have private methods ([PR #3973](https://github.com/ponylang/ponyc/pull/3973))
- Remove hack that prevented documentation generation for "test classes" ([PR #3978](https://github.com/ponylang/ponyc/pull/3978))

## [0.46.0] - 2022-01-16

Expand Down
6 changes: 3 additions & 3 deletions packages/buffered/_test.pony
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use "ponytest"

actor Main is TestList
actor \nodoc\ Main is TestList
new create(env: Env) => PonyTest(env, this)
new make() => None

Expand All @@ -9,7 +9,7 @@ actor Main is TestList
test(_TestReader)
test(_TestWriter)

class iso _TestReader is UnitTest
class \nodoc\ iso _TestReader is UnitTest
"""
Test adding to and reading from a Reader.
"""
Expand Down Expand Up @@ -198,7 +198,7 @@ class iso _TestReader is UnitTest
// the last byte is consumed by the reader
h.assert_eq[USize](b.size(), 0)

class iso _TestWriter is UnitTest
class \nodoc\ iso _TestWriter is UnitTest
"""
Test writing to and reading from a Writer.
"""
Expand Down
Loading