Include phpcs.xml.dist

Created on 27 September 2024, 4 months ago

Problem/Motivation

Including a phpcs.xml.dist would assist in running phpcs locally before pushing.

Proposed resolution

The usual phpxml.cs.dist that gets downloaded with ddev-drupal-contrib works OK, but I think there's a few additions we need, mostly just the `exclude-patterns`:

<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="drupal-project">
  <description>Default PHP CodeSniffer configuration for Drupal project.</description>
  <rule ref="vendor/drupal/coder/coder_sniffer/Drupal/ruleset.xml"/>
  <arg name="extensions" value="php,inc,module,install,info,test,profile,theme"/>
  <exclude-pattern>\.ddev</exclude-pattern>
  <exclude-pattern>sveltejs/node_modules</exclude-pattern>
</ruleset>
🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇺🇸United States chrisfromredfin Portland, Maine

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @chrisfromredfin
  • First commit to issue fork.
  • Merge request !594Resolve #3477335 "Include phpcs.xml.dist" → (Open) created by ankitv18
  • First commit to issue fork.
  • Pipeline finished with Failed
    4 months ago
    #301992
  • First commit to issue fork.
  • Pipeline finished with Failed
    4 months ago
    Total: 422s
    #302962
  • You could try these settings.

  • 🇮🇳India debrup

    Working on it.

  • Pipeline finished with Failed
    3 months ago
    Total: 440s
    #330776
  • Pipeline finished with Success
    3 months ago
    Total: 1253s
    #330804
  • 🇮🇳India debrup

    Changed the phpcs.xml.dist file according to suggestion and also to pass the GitLab pipelines.
    @chrisfromredfin @jvbrian Please let me know if the changes are satisfactory or not.

  • 🇮🇳India ankitv18

    @debrup your both commits are totally irrelevant. Please do revert those commits.
    Phpcs failures needs to be to address separate ~~ objective of this issue to add the phpcs.xml.dist file

  • Pipeline finished with Failed
    3 months ago
    Total: 543s
    #330908
  • Pipeline finished with Failed
    3 months ago
    Total: 358s
    #330919
  • 🇮🇳India debrup

    Reverted the changes as requested by @ankitv18.

  • I think we should also fix the problems with the coding standards in PB in the scope of the issue.I'll take this and do that.If someone thinks that it should be done as a separate issue then I'll revert my changes in the commit that I will push.

  • Pipeline finished with Failed
    3 months ago
    Total: 471s
    #330954
  • Pipeline finished with Failed
    2 months ago
    Total: 518s
    #332735
  • 🇺🇸United States chrisfromredfin Portland, Maine
  • Assigned to utkarsh_33
  • Status changed to Needs work about 1 month ago
  • 🇮🇳India sayan_k_dutta

    @utkarsh_33 are you working on it now?

  • No you can take that if you want.

  • Pipeline finished with Failed
    about 1 month ago
    Total: 219s
    #363216
  • Pipeline finished with Failed
    about 1 month ago
    Total: 397s
    #363928
  • Pipeline finished with Failed
    about 1 month ago
    Total: 327s
    #363957
  • Pipeline finished with Failed
    about 1 month ago
    Total: 388s
    #363989
  • Pipeline finished with Failed
    about 1 month ago
    Total: 266s
    #364003
  • Pipeline finished with Failed
    about 1 month ago
    Total: 361s
    #364023
  • 🇮🇳India sayan_k_dutta

    Fixed the phpcs and phpstan issues.
    The pipeline is failing for some tests and eslint errors. Someone please look into it.

Production build 0.71.5 2024