8000 [Yaml][Twig-Bridge] Allow passing multiple files/directories to lint command · Issue #28498 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Yaml][Twig-Bridge] Allow passing multiple files/directories to lint command #28498

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
BackEndTea opened this issue Sep 18, 2018 · 4 comments
Closed

Comments

@BackEndTea
Copy link
Contributor

Description
Currently the lint:yaml and lint:twig command allow only one file or directory to be passed, e.g.: bin/console lint:yaml config/ etc.

I'd like to be able to pass multiple files/directories to these commands, which are then all linted. This is because as part of my CI, i lint all my yaml files, which can be in different directories.

For me the lint:twig isn't really needed, but if it is done for yaml, the twig one should work the same way, for consistency.

@javiereguiluz
Copy link
Member

Given that there is a simple Bash-based alternative to fix this:

for DIR in dir1 dir2 dir3 file1 file2
do
    bin/console lint:yaml $DIR	
done

We should decide if this is a common-enough scenario and add this feature ... or consider it not common enough and not add it.

@yceruto
Copy link
Member
yceruto commented Sep 18, 2018

It's actually possible to pass multiples values (files or directories) to the lint:twig command:

$ bin/console lint:twig filename1 filename2 dir1 dir2

I think lint:yaml should allow InputArgument::IS_ARRAY too, at least for consistency.

@chalasr
Copy link
Member
chalasr commented Sep 18, 2018

👍

@yceruto
Copy link
Member
yceruto commented Sep 20, 2018

see #28521 and #28522

nicolas-grekas added a commit that referenced this issue Sep 21, 2018
… in LintCommand (yceruto)

This PR was squashed before being merged into the 4.2-dev branch (closes #28521).

Discussion
----------

[Yaml] Added support for multiple files or directories in LintCommand

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #28498
| License       | MIT
| Doc PR        | symfony/symfony-docs#10367

Commits
-------

d0f7950 [Yaml] Added support for multiple files or directories in LintCommand
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants
0