Exclude boilerplate maintenance script code from test coverage

Why:
* Maintenance scripts contain boilerplate code which cannot be
  marked as covered by PHPUnit tests (as they don't understand
  file level test coverage).
* This boilerplate code should therefore be ignored for test
  coverage reports, as even if the maintenance script is tested
  it won't be marked as such.
* Doing this is recommended by MediaWiki Core documentation in
  'maintenance/README'.

What:
* Wrap boilerplate code with "codeCoverageIgnoreStart" and
  "codeCoverageIgnoreEnd" per the documentation in MediaWiki
  core 'maintenance/README'.

Bug: T399460
Change-Id: Ic0e508eab643b5dbd45277bdb60c7193d710f56a
1 file changed
tree: d89749e035f1d0df5a60e982ac2bbb1ddb8b8685
  1. .phan/
  2. db/
  3. i18n/
  4. maintenance/
  5. modules/
  6. src/
  7. tests/
  8. .eslintignore
  9. .eslintrc.json
  10. .gitignore
  11. .gitreview
  12. .phpcs.xml
  13. CODE_OF_CONDUCT.md
  14. composer.json
  15. COPYING
  16. extension.json
  17. Gruntfile.js
  18. package-lock.json
  19. package.json
  20. PageAssessments.i18n.alias.php
  21. PageAssessments.i18n.magic.php
  22. README.md
README.md

PageAssessments

See https://www.mediawiki.org/wiki/Extension:PageAssessments for detailed documentation.

This extension is for the purposes of storing article assessments in a database table and providing an API for retrieving them. This extension was primarily designed to support WikiProjects, but it can be used for a number of other similar purposes.

The parser function for invoking a new review is: {{#assessment: | | }}. Typically this parser function will be embedded in an assessment template that is then transcluded on an article's talk page.

If the extension is configured to support subprojects (see Configuration below), the subproject should follow the project name and be separated with a slash. For example, to record an assessment for the Crime task force of WikiProject Novels, you would use an assessment like: {{#assessment:Novels/Crime task force|B|Low}}

Configuration

The following configuration variables can be set from your LocalSettings.php file.

  • $wgPageAssessmentsOnTalkPages: Set to 'true' if page assessments are recorded on talk pages, or 'false' if page assessments are recorded directly on main namespace pages. Default is true.
  • $wgPageAssessmentsSubprojects: Set to 'true' if the wiki distinguishes between projects and subprojects. Default is false.