{"id":13852326,"url":"https://github.com/drupol/drupal-conventions","last_synced_at":"2025-03-21T11:33:37.843Z","repository":{"id":34045096,"uuid":"166981958","full_name":"drupol/drupal-conventions","owner":"drupol","description":"Check (and fix) your code against Drupal's code conventions and coding standard.","archived":false,"fork":false,"pushed_at":"2022-03-29T11:16:52.000Z","size":102,"stargazers_count":24,"open_issues_count":4,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-11T21:11:46.772Z","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/drupol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null},"funding":{"github":"drupol"}},"created_at":"2019-01-22T11:24:30.000Z","updated_at":"2024-03-28T10:05:03.000Z","dependencies_parsed_at":"2022-08-08T00:00:06.161Z","dependency_job_id":null,"html_url":"https://github.com/drupol/drupal-conventions","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/drupol%2Fdrupal-conventions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drupol%2Fdrupal-conventions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drupol%2Fdrupal-conventions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drupol%2Fdrupal-conventions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drupol","download_url":"https://codeload.github.com/drupol/drupal-conventions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221815044,"owners_count":16885104,"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-08-04T22:01:15.239Z","updated_at":"2024-10-28T10:06:05.037Z","avatar_url":"https://github.com/drupol.png","language":"PHP","funding_links":["https://github.com/sponsors/drupol","https://paypal.me/drupol"],"categories":["PHP","Scripts"],"sub_categories":["Git hooks"],"readme":"[![Latest Stable Version](https://img.shields.io/packagist/v/drupol/drupal-conventions.svg?style=flat-square)](https://packagist.org/packages/drupol/drupal-conventions)\n [![Stars](https://img.shields.io/github/stars/drupol/drupal-conventions.svg?style=flat-square)](https://github.com/drupol/drupal-conventions)\n [![Total Downloads](https://img.shields.io/packagist/dt/drupol/drupal-conventions.svg?style=flat-square)](https://packagist.org/packages/drupol/drupal-conventions)\n [![Build Status](https://img.shields.io/travis/drupol/drupal-conventions/master.svg?style=flat-square)](https://travis-ci.org/drupol/drupal-conventions)\n [![License](https://img.shields.io/github/license/drupol/drupal-conventions.svg?style=flat-square)](https://packagist.org/packages/drupol/drupal-conventions)\n [![Say Thanks!](https://img.shields.io/badge/Say-thanks-brightgreen.svg?style=flat-square)](https://saythanks.io/to/drupol)\n [![Donate!](https://img.shields.io/badge/Donate-Paypal-brightgreen.svg?style=flat-square)](https://paypal.me/drupol)\n\n# Drupal conventions\n\nThis tool will check your code against Drupal's coding standard.\n\nIt's based on [GrumPHP](https://github.com/phpro/grumphp) and comes with a default configuration tailored for Drupal development.\n\nThe following checks are triggered:\n* [Drupal coder](https://www.drupal.org/project/coder) code sniffer's checks\n* Custom [PHP CS Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) configuration\n* PHPLint\n* YAMLlint\n* JSONlint\n\nDrupal 7 and 8 are supported.\n\n## Installation\n\n```shell\ncomposer require --dev drupol/drupal-conventions\n```\n\n### If you're not using GrumPHP\n\nManually add to your `composer.json` file:\n\n#### Drupal 8\n```yaml\n    \"extra\": {\n        \"grumphp\": {\n            \"config-default-path\": \"vendor/drupol/drupal-conventions/config/drupal8/grumphp.yml\"\n        }\n    }\n```\n#### Drupal 7\n```yaml\n    \"extra\": {\n        \"grumphp\": {\n            \"config-default-path\": \"vendor/drupol/drupal-conventions/config/drupal7/grumphp.yml\"\n        }\n    }\n```\n\n### If you're using GrumPHP already\n\nEdit the file `grumphp.yml.dist` or `grumphp.yml` and add on the top it:\n\n#### Drupal 8\n```yaml\nimports:\n  - { resource: vendor/drupol/drupal-conventions/config/drupal8/grumphp.yml }\n```\n#### Drupal 7\n```yaml\nimports:\n  - { resource: vendor/drupol/drupal-conventions/config/drupal7/grumphp.yml }\n```\n\nTo add an extra Grumphp task:\n\n```yaml\nimports:\n  - { resource: vendor/drupol/drupal-conventions/config/drupal7/grumphp.yml }\n\nparameters:\n  extra_tasks:\n    phpunit:\n      always_execute: false\n```\n\nIn conjunction with `extra_tasks`, use `skip_tasks` to skip tasks if needed.\n\n## Contributing\n\nFeel free to contribute to this library by sending Github pull requests. I'm quite reactive :-)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrupol%2Fdrupal-conventions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrupol%2Fdrupal-conventions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrupol%2Fdrupal-conventions/lists"}