Quality Assurance tools for Drupal

Maintainers

Details

github.com/OSInet/qa

Source

Issues

Installs: 415

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 2

Forks: 0

Open Issues: 7

Type:drupal-module

dev-8.x-1.x 2023-03-26 16:11 UTC

This package is auto-updated.

Last update: 2024-10-26 19:48:35 UTC


README

Scrutinizer Code Quality

This module needs to be installed on your site to run checks on various aspects of your Drupal production database, configuration storage (D9/D8) and file layout.

It also has branches for D7 and D6, each running on the matching version.

CAVEAT EMPTOR - using this module and interpreting its results requires significant understanding of core operation: just because a check reports on suspicious data does not imply there is actually an problem, only that human review is needed. This tools is primarily designed to help professional auditors review sites; it is not meant for webmasters in the general case.

Built-in checks

QA is designed to be extended by additional modules implementing control plugins.

  • Plan: check is expected to be developed, but not yet started
  • TBP: to be ported = check existing in earlier versions but not yet ported to D9/D8.
  • WIP: work in progress.

QA also includes some non-check commands.

Graphs

  • dependency graph of enabled modules and themes, usable either on the Web UI for smaller sites or from drush for bigger graphs. This feature will generate GraphViz .dot files, to convert with Graphviz dot command, typically by piping the output like this:
      $ drush qa-dependencies | dot -Tsvg > qa_dependencies.svg
  • On Drupal 8.3 and later, graphs of the transitions in a given workflow (for core workflows, not for the contrib workflow module). This feature will generate GraphViz .dot files, to convert with Graphviz dot command, typically by piping the output like this:
       $ drush qa_workflow_graph | dot -Tsvg > qa_workflow.svg
  • The workflow graph also has a tabular version.

Copyright and license

This module is © 2005-2020 Frédéric G. MARAND, for OSInet.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Contributing

Developing additional custom checks follows this process:

  • create a custom module
  • create a QaCheck plugin, which will implement QaCheckInterface, and likely be based on QaCheckBase for simplicity. Its properties are:
    • id : just like any Drupal plugin. The name should be like <package>.<check_name>, where <package> will be used to group related packages in the UI. Plugins are expected to be located in the Plugin\QaCheck\<Package> directory, instead of being just in the Plugin\QaCheck directory.
    • label: the short description of the plugin, used in admin lists.
    • details: optional. A longer description of the plugin purpose, used for help in the Web UI. Default: empty.
    • usesBatch: optional. Enables use of the Batch API for long-running checks (WIP). Default: false.
    • steps: optional. The number of different steps reported by the check. Default: 1.
  • add a command to QaCommands, calling QaCommands::runPlugin($name).

Contributions are welcome: use Github issues and pull requests.