Page MenuHomePhabricator

[EPIC] Wikimedia should use a standard set of tools for managing code quality
Closed, ResolvedPublic

Description

So far we have lots of standard tools such as jscs, jsduck, grunt etc but there are still tools that certain teams are using that other teams are not. We are also doing things differently in certain places. This task tracks these sorts of things. Please add additional ones you find.

Event Timeline

Jdlrobson raised the priority of this task from to Needs Triage.
Jdlrobson updated the task description. (Show Details)
Jdlrobson subscribed.

PHP

  • PHPUnit for tests
  • PHPCS for code style and basic static analysis
  • Phan for advanced static analysis
  • php-parallel-lint for linting (wrapper around php -l)
  • doxygen for documentation

JavaScript

  • eslint for code style and static analysis
  • jscs for code style (legacy, being phased out)
  • jshint for code style (legacy, behing phased out)
  • jsduck for documentation

JSON

  • grunt-jsonlint for syntax checking

i18n / banana

  • grunt-banana-checker for ensuring documentation is complete

This is less explicitly documented at https://www.mediawiki.org/wiki/Continuous_integration/Entry_points

This is great @Legoktm any reason not to update https://www.mediawiki.org/wiki/Continuous_integration/Entry_points to include it and call this done?

(with respect to jsduck we should link to https://phabricator.wikimedia.org/T138401 )

It looks great. I made a few edits, let me know what you think of those.

Could we include a column for build step (see Re: [Wikitech-l] How does a build process look like for a mediawiki extension repository?) It would be good to distinguish that this doesn't exist.
Command runner seems a little vague.

Legoktm claimed this task.

It looks great. I made a few edits, let me know what you think of those.

Looks good to me, I filled in some more of the Python stuff.

Could we include a column for build step (see Re: [Wikitech-l] How does a build process look like for a mediawiki extension repository?) It would be good to distinguish that this doesn't exist.

None of them have it right? I don't think it makes much sense to document things that don't exist. It's out of scope for that page at least IMO.

Command runner seems a little vague.

"task runner" maybe? (that's what grunt calls itself). Basically it's the tool that installs the dependencies and then executes the various sub commands to run all the tests (e.g. composer test, npm test, tox).

I'll mark this as resolved and we can keep iterating on the wiki.