We are testing coding standards with PHP CodeSniffer, using the Drupal coding standards from the Coder module. We need to do a couple of steps in order to download and configure them so we can run a coding standards check.

Problem/Motivation

Complete the implementation of DrupalPractice.CodeAnalysis.VariableAnalysis. There are several excluded patterns in phpcs.xml for this sniff.

Steps to reproduce

Proposed resolution

Remaining tasks

#3477156: Use DrupalPractice.CodeAnalysis.VariableAnalysis on Functional* tests
#3477205: Use DrupalPractice.CodeAnalysis.VariableAnalysis in core/tests

This issue will enable the sniff and fix any remaining errors.

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3348079

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

quietone created an issue. See original summary.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

Title: Fix DrupalPractice.CodeAnalysis.VariableAnalysis » [meta] Fix DrupalPractice.CodeAnalysis.VariableAnalysis
Issue summary: View changes
quietone’s picture

Issue summary: View changes
quietone’s picture

One child completed.

quietone’s picture

Title: [meta] Fix DrupalPractice.CodeAnalysis.VariableAnalysis » Enable DrupalPractice.CodeAnalysis.VariableAnalysis
Status: Active » Needs review

Change this to just enabling the sniff

quietone’s picture

Issue tags: +Coding standards
borisson_’s picture

Status: Needs review » Reviewed & tested by the community

This enables a sniff that is already passing, so this looks good to go to me.

  • catch committed 6813e244 on 11.x
    Issue #3348079 by quietone: Enable DrupalPractice.CodeAnalysis....
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x, thanks!

Status: Fixed » Closed (fixed)

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