Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Views Bootstrap 5.5.4 — Minor update available for module views_bootstrap (5.5.4). Release: Rightup theme 1.0.3 — Minor update available for theme vartheme_bs5_rightup (1.0.3). Release: CommentOn 1.0.6 — Minor update available for module commenton (1.0.6). Release: ChatGPT Ads 1.0.3 — Minor update available for module chatgpt_ads (1.0.3). Release: Opensolr Search 5.1.3 — Minor update available for module opensolr_search (5.1.3). Release: ServiceM8 Webform Integration 1.2.1 — Minor update available for module servicem8_webform (1.2.1). Release: PostfixAdmin 1.0.0 — Initial release available for module postfix_admin (1.0.0)! Release: ip_analyser 1.0.3 — Minor update available for module ip_analyser (1.0.3). Module Revived: Swagger-PHP OpenAPI 3 documentation generator 1.0.0 — Module swagger_php updated after 10 months of inactivity (1.0.0). Security Coverage: Microsoft Azure AI — Module ai_provider_azure now has official Drupal security advisory coverage.

DCQ - Drupal Code Quality. Check code quality through git.

Installation and Usage

Requires phpcs and module coder

Installing local:
Copy pre-commit and pre-commit_dcq files from directory of module DCQ
to .git/hooks directory of your project, and add permission
"Allow run file as program" for these files.
The pre-commit_dcq script will analyse relevant committed files against the
Drupal coding standard and display errors and warnings.
In the event that you wish to commit your files regardless of the standards
errors do git commit --no-verify and git will not execute the pre-commit hooks

You can also look at this instruction https://drupal.org/node/2067677

You can use drush command from dcq module, for install precommit scripts on every new project

Installation remote:
Copy files from dcq_remote_scripts directory into your remote repository
.git/hooks/ directory. Also you can use symlinks for post-receive and
post-receive_dcq files.

post-receive hook will run every time you commit to remote repository.
He does not interrupt the process of adding files. It only checks them if it
finds errors, it sends an error report by e-mail specified in the settings of
the script. This is useful in cases where a senior developer controls the
quality of the code other developers on the project.

Script post-receive_dcq used on the remote repository, requires a mandatory
settings.

Ignoring the check code with using a configuration file:

You can ignore the check for files and folders (third-party modules or features.). See example on page of module settings.

File .dcq_ignore should be under version control, in order to make it work
for all developers. And to be able to use by hook post-receive for checking
on a remote server.

Troubleshooting:

To the git could run a scripts and hooks, you should set permissions for files
"Allow run file as program"

Useful links:
Eclipse formatter for Drupal Code Quality

Special thanks to bevanw for help in initial development.

Инструкция по установке DCQ на русском языке



Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Mar 2023
Latest release
3 years ago
Releases (12 mo)
0
Maintenance
Dormant

Releases

Version Type Core Release date
1.0.x-dev Dev Mar 6, 2023