Skip to content
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

[Twig] Add options to the twig:lint command #10026

Closed
Ninir opened this issue Jan 15, 2014 · 6 comments

Comments

Projects
None yet
4 participants
@Ninir
Copy link

commented Jan 15, 2014

Hi,

Currently, twig:lint is displaying the output in the CLI.
There are cases, such as Jenkins, where you would like to generate a report to display it, thus formatting the output of the command.

I am thinking of:

  • --format
  • --file

What do you guys think of adding formatting option, in order to do such things? Would it make sense to you?

@stof

This comment has been minimized.

Copy link
Member

commented Jan 15, 2014

I don't think --file should be added (or we should add it to all commands). If you need to put the output in a file, you can simply redirect the output of the command in it.

@Ninir

This comment has been minimized.

Copy link
Author

commented Jan 15, 2014

Is the --file option global to every commands could be a good idea? redirecting the output is also a way to do it...

Do you find the usage of a format option appropriate?

@lyrixx

This comment has been minimized.

Copy link
Member

commented Jan 15, 2014

I agree with @stof abot the --file. Redirection is supported by almost every OS.

About the --format, I agree. I did that for the yaml:lint. I can do this patch

@Ninir

This comment has been minimized.

Copy link
Author

commented Jan 15, 2014

@lyrixx It would be with pleasure :)

fabpot added a commit that referenced this issue Jan 24, 2014

feature #10064 [TwigBridge] Added support for json format in twig:lin…
…t command (lyrixx)

This PR was merged into the 2.5-dev branch.

Discussion
----------

[TwigBridge] Added support for json format in twig:lint command

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #10026
| License       | MIT
| Doc PR        | -

Commits
-------

4d2f94a [TwigBridge] Added support for json format in twig:lint command
621f991 [TwigBridge] Cleaned documentation of twig:lint command

@fabpot fabpot closed this Jan 24, 2014

@Ninir

This comment has been minimized.

Copy link
Author

commented Jan 24, 2014

Thanks @lyrixx :)!

@lyrixx

This comment has been minimized.

Copy link
Member

commented Jan 24, 2014

@Ninir you're welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.