soullivaneuh / styleci-fixers

[DEPRECATED] Replaced by a new project =>
https://flintci.io
4 stars 3 forks source link

Support "none" preset? #13

Closed jaydiablo closed 8 years ago

jaydiablo commented 8 years ago

I realize this preset isn't returned from the styleci API:

https://api.styleci.io/presets

But it is listed in their documentation as an allowed preset:

https://styleci.readme.io/v1.0/docs/presets

We also have an additional preset, none, which enables no fixers.

Currently if I specify "none" in the .styleci.yml, and process it with the php-cs-fixer bridge, I get an exception:

[Symfony\Component\Config\Definition\Exception\InvalidConfigurationException] The value "none" is not allowed for path "styleci.preset". Permissible values: "psr1", "psr2", "symfony", "laravel", "recommended"

Thoughts to add this as an allowed preset?

soullivaneuh commented 8 years ago

Hi @jaydiablo and thanks for the report.

As you said, the none preset is not given by the API.

I think it's "normal" because the none preset does not have any fixer. Can you please confirm that @GrahamCampbell?

IMO, nothing have to be done here because this package is just a generator form the API.

But the none preset could be added here: https://github.com/Soullivaneuh/php-cs-fixer-styleci-bridge/blob/v2.0.2/src/StyleCI/Configuration.php

GrahamCampbell commented 8 years ago

I think it's "normal" because the none preset does not have any fixer. Can you please confirm that @GrahamCampbell?

Yes, the idea is that it does nothing.

GrahamCampbell commented 8 years ago

It's implemented as a special case higher up in the abstraction, which is why it's not showing up on our API.

GrahamCampbell commented 8 years ago

It's also treated as a special case in our docs: https://styleci.readme.io/docs/presets.

soullivaneuh commented 8 years ago

Thanks @GrahamCampbell, this confirm what I was thinking.

@jaydiablo I'll update the bridge instead.

jaydiablo commented 8 years ago

@Soullivaneuh thanks!

soullivaneuh commented 8 years ago

@jaydiablo please see: https://github.com/Soullivaneuh/php-cs-fixer-styleci-bridge/pull/67