[wp-trac] [WordPress Trac] #35065: Tests for docblock quality
WordPress Trac
noreply at wordpress.org
Wed Dec 23 07:01:06 UTC 2015
#35065: Tests for docblock quality
------------------------------+------------------------------
Reporter: johnbillion | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses: docs
------------------------------+------------------------------
Comment (by johnbillion):
[attachment:docblocks.2.diff] switches to static analysis instead of PHP's
built-in Reflection, so classes and functions that are not loaded in the
current scope can be tested too. Needs Composer to set up before running
the tests:
1. `cd tests/phpunit`
2. `composer install`
See the `$to_search` and `$files` variables in the
`Tests_DocBlocks::dataReflectionTestFunctions()` method for tweaks that
can be made, and also the `$ignore_empty` static property on the class
which silences errors caused by functions and methods which completely
lack a docblock.
At this point I think it's clear that such tests don't need to be in
core's tests, but having them allows the docs team to work through the
issues that this patch does highlight.
See #32246 for ongoing results.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35065#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list