sindresorhus / atom-editorconfig

Helps developers maintain consistent coding styles between different editors
https://atom.io/packages/editorconfig
MIT License
812 stars 80 forks source link

Update the grammar to allow the `unset` value for any property #193

Closed alaycock closed 7 years ago

alaycock commented 7 years ago

Involved .editorconfig-files

The default editorconfig grammar.

The grammar for this editorconfig should be updated to include the updated spec for .editorconfig files. It allows the unset option to be specified for any property, per this issue on the editorconfig issue tracker.

No code changes beyond the grammar would be necessary (AFAIK), but it would just allow for proper syntax highlighting.

More discussion can be found here:
https://github.com/editorconfig/editorconfig/issues/285
https://github.com/editorconfig/editorconfig/issues/282 Updated wiki page.

If the issue is resolved by only changing the grammar, I can also make a PR, but I wanted to see if there were any comments prior to that.

florianb commented 7 years ago

Hi @alaycock - great finding, thanks!

As far as i remember you're right - the code should already ignore unknown settings and therefore interpret unset as auto.

However, i would have ideas for two little improvements:

  1. It would probably be nice changing the status-result showing unset instead of auto (to stay in the terminology of the standard)?
  2. It would be nice to have a test checking if unset is properly being recognized as "not valid".

I would really appreciate if you would create a PR, you may just change the grammar or choose to help us improving a little bit more! ❤️ Let me know if you need any help.