Skip to content

[DX][Twig] Lint all templates when no argument is passed to lint:twig #33443

@javiereguiluz

Description

@javiereguiluz

Description
If you run this command, you'll see an error:

$ php bin/console lint:twig

You need to pass the directory to lint:

$ php bin/console lint:twig templates/

This is boring so ... could we change this to lint all the templates stored in all the configured twig.paths of the application when no argument is passed? And if you add the -vvv option, you see the details:

$ php bin/console lint:twig

  [OK] All 30 Twig files contain valid syntax.


$ php bin/console lint:twig -vvv

  // Checked 15 Twig files in templates/
  // Checked 5 Twig files in vendor/acme/ (namespace @acme)
  // Checked 10 Twig files in email/templates/

  [OK] All 30 Twig files contain valid syntax.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DXDX = Developer eXperience (anything that improves the experience of using Symfony)FeatureTwigBundle

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions