Problem/Motivation

Saving time on checking standards and practice before committing any code.

#3113184: Drupal 9 compatibility for [Varbase Reports] with Drupal coding standard and practice


Drupal coding standard and Drupal Practice check should pass

PHPCS, PHPCBF for both --standard=Drupal and --standard=DrupalPractice

Check Varbase Reports Drupal coding standard

phpcbf --standard=Drupal --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml /var/www/html/products/varbase_reports/

phpcs --standard=Drupal --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml /var/www/html/products/varbase_reports/

Check Varbase Reports Drupal Practice

phpcbf --standard=DrupalPractice --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml /var/www/html/products/varbase_reports/

phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml /var/www/html/products/varbase_reports/


Proposed resolution

yarn phpcs
yarn phpcbf

as

  "scripts": {
    "phpcs": "phpcs --standard=./.phpcs.xml .",
    "phpcbf": "phpcbf --standard=./.phpcs.xml ."
  },

Comments

RajabNatshah created an issue. See original summary.

  • RajabNatshah committed db5afd7 on 8.x-6.x
    Issue #3175409: Add yarn script commands for Drupal coding standard and...
rajab natshah’s picture

Assigned: rajab natshah » mohammed j. razem
Status: Active » Needs review
Issue tags: +varbase-8.8.7, +varbase-9.0.0

The inline commands

rajab@vardot-dev:/var/www/html/products/varbase_reports$ phpcs --standard=Drupal --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml /var/www/html/products/varbase_reports/
rajab@vardot-dev:/var/www/html/products/varbase_reports$ phpcbf --standard=Drupal --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml /var/www/html/products/varbase_reports/

No fixable errors were found

Time: 60ms; Memory: 8MB
rajab@vardot-dev:/var/www/html/products/varbase_reports$ phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml /var/www/html/products/varbase_reports/

yarn phpcs

rajab@vardot-dev:/var/www/html/products/varbase_reports$ yarn phpcs
yarn run v1.22.5
$ phpcs --standard=./.phpcs.xml .
Done in 0.17s.

yarn phpcbf

rajab@vardot-dev:/var/www/html/products/varbase_reports$ yarn phpcbf
yarn run v1.22.5
$ phpcbf --standard=./.phpcs.xml .

No fixable errors were found

Time: 64ms; Memory: 8MB

Done in 0.19s.
rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned
rajab natshah’s picture

Status: Needs review » Fixed
rajab natshah’s picture

Title: Add yarn script commands for Drupal coding standard and Drupal Practice for Varbase API » Add yarn script commands for Drupal coding standard and Drupal Practice for Varbase Reports

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.