{"id":20336659,"url":"https://github.com/jover/drupal-code-check","last_synced_at":"2025-04-11T22:41:02.808Z","repository":{"id":57001895,"uuid":"73568919","full_name":"jover/drupal-code-check","owner":"jover","description":"A Git pre-commit hook to check Drupal Coding Standards and more.","archived":false,"fork":false,"pushed_at":"2017-05-05T14:09:35.000Z","size":31,"stargazers_count":4,"open_issues_count":2,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T18:41:11.781Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jover.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-12T17:54:31.000Z","updated_at":"2021-11-29T17:21:15.000Z","dependencies_parsed_at":"2022-08-21T11:40:49.166Z","dependency_job_id":null,"html_url":"https://github.com/jover/drupal-code-check","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jover%2Fdrupal-code-check","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jover%2Fdrupal-code-check/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jover%2Fdrupal-code-check/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jover%2Fdrupal-code-check/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jover","download_url":"https://codeload.github.com/jover/drupal-code-check/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248493022,"owners_count":21113159,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T21:06:19.878Z","updated_at":"2025-04-11T22:41:02.777Z","avatar_url":"https://github.com/jover.png","language":"PHP","funding_links":[],"categories":["Scripts"],"sub_categories":["Git hooks"],"readme":"# Drupal Code Check\n\nA Git pre-commit hook to check Drupal Coding Standards and more.\n\n[![Latest Stable Version](https://poser.pugx.org/jover_be/drupal-code-check/v/stable)](https://packagist.org/packages/jover_be/drupal-code-check) [![Total Downloads](https://poser.pugx.org/jover_be/drupal-code-check/downloads)](https://packagist.org/packages/jover_be/drupal-code-check) [![Latest Unstable Version](https://poser.pugx.org/jover_be/drupal-code-check/v/unstable)](https://packagist.org/packages/jover_be/drupal-code-check) [![License](https://poser.pugx.org/jover_be/drupal-code-check/license)](https://packagist.org/packages/jover_be/drupal-code-check) [![composer.lock](https://poser.pugx.org/jover_be/drupal-code-check/composerlock)](https://packagist.org/packages/jover_be/drupal-code-check)\n\n## Description\n\nThis Git pre-commit hook will be active on your Composer based Drupal project.\n\nThings which will be checked in the pre-commit hook:\n\n* Syntax checking using _PHP Linter_\n* Automatically try to match code style via _PHP Code Sniffer Beautifier and Fixer_\n* Coding standards checking using _PHP Code Sniffer_\n* Blacklisted strings checking/validation\n\nNote that files of the following origins are **not checked**:\n\n* Drupal Core\n* Contributed Modules\n* Contributed Libraries\n* Contributed Themes\n* Contributed Profiles\n\n## Getting started\n\n### Prerequisites\n\n* Composer\n* Composer based Drupal project\n* PHP 5.4 or higher\n\n### Installation\n\nAdd this project as a composer dependency on your Composer based Drupal project.\n\n```bash\ncomposer require jover_be/drupal-code-check\n```\n\nAnd don't forget to update...\n\n```bash\ncomposer update jover_be/drupal-code-check\n```\n\nIn order to activate the Git Hooks, update your composer.json file like following:\n\n```\n{\n    \"scripts\": {\n        \"post-install-cmd\": [\n            \"jover_be\\\\drupal_code_check\\\\GitHooks::create\"\n        ],\n        \"post-update-cmd\": [\n        \t\"jover_be\\\\drupal_code_check\\\\GitHooks::create\",\n        ]\n    }\n}\n```\n\n#### Development requirement\n\nIn case you want to install it as a development requirement (_require-dev_),\nmake use of the project _neronmoon/scriptsdev_ in order to execute the\nscripts only in case your project was installed in development mode.\n\n```bash\ncomposer require --dev neronmoon/scriptsdev\ncomposer require --dev jover_be/drupal-code-check\n```\n\nAnd instead, you should be using the _scripts-dev_ part as described by \n\n```\n{\n    \"extra\": {\n        \"scripts-dev\": {\n            \"post-install-cmd\": [\n                \"jover_be\\\\drupal_code_check\\\\GitHooks::create\"\n            ],\n            \"post-update-cmd\": [\n                \"jover_be\\\\drupal_code_check\\\\GitHooks::create\",\n            ]\n        }\n    }\n}\n```\n\n## Author\n\n[jover.be](http://www.jover.be)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjover%2Fdrupal-code-check","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjover%2Fdrupal-code-check","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjover%2Fdrupal-code-check/lists"}