Problem/Motivation

Drupal's coder project has rules for .info.yml files but atm we can't use them because we're not scanning them. Let's fix that.

This will allow us to scan for #2798891: Define project dependencies in core module .info files.

Proposed resolution

Enable scanning of info.yml files.

Remaining tasks

None

User interface changes

None

API changes

None

Data model changes

None

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Status: Active » Needs review
FileSize
5.18 KB

Status: Needs review » Needs work

The last submitted patch, 2: 2959148-2.patch, failed testing. View results

alexpott’s picture

Status: Needs work » Needs review
FileSize
4.7 KB

Whoops forgot to pull before creating the patch.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

This makes sense! Could we add more validations, like checking that we have valid yml files?

alexpott’s picture

Well invalid yml would fail to parse and hopefully that'd produce a sensible error somewhere but there's:

  • Drupal_Sniffs_InfoFiles_AutoAddedKeysSniff
  • Drupal_Sniffs_InfoFiles_DuplicateEntrySniff
  • Drupal_Sniffs_InfoFiles_RequiredSniff
  • DrupalPractice_Sniffs_InfoFiles_NamespacedDependencySniff

That might offer us something.

alexpott’s picture

Title: Enable PHPCS for info.yml file » Enable PHPCS for info.yml files
dawehner’s picture

Well invalid yml would fail to parse and hopefully that'd produce a sensible error somewhere but there's:

Fair, still it'd be nice in some future to fail early on any yml file.

larowlan’s picture

Status: Reviewed & tested by the community » Fixed

Committed ba1e570 and pushed to 8.6.x.

  • larowlan committed ba1e570 on 8.6.x
    Issue #2959148 by alexpott: Enable PHPCS for info.yml files
    

Status: Fixed » Closed (fixed)

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

idebr’s picture

There is an effort to apply PHPCS for all yml files at #2901653: Add yml files to phpcs.xml.dist