Problem/Motivation

drush vale:lint ENTITY_TYPE:BUNDLE prints an empty table and exits 0 when nothing in the bundle is checked by Vale. That reads as a clean pass. On a Drupal CMS site, vale:lint canvas_page:canvas_page does exactly that, so a CI step passes on content Vale never saw.

Steps to reproduce

  1. Create a content type with no field opted in to Vale.
  2. Run drush vale:lint node:that_type. It prints an empty table and exits 0.

Proposed resolution

  • Refuse a scope with nothing checked by Vale: "No field in node:that_type is checked with Vale.", exit 1.
  • Count a bundle as checked when it has an opted-in field, or when a component it can hold, such as a paragraph type, has one. Follow only references to component types, as linting does, and search each bundle once.
  • Say so in the README.

Remaining tasks

  • Review and merge.

Comments

deciphered created an issue. See original summary.

  • deciphered committed 0c471511 on 1.0.x
    feat(#3632983): refuse a lint scope with nothing checked by vale
    
deciphered’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.