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

Remove hideFromUser invalid key #55

Closed
wants to merge 1 commit into from

Conversation

pchaigno
Copy link
Contributor

Is the hideFromUser serving any purpose? It's detected as invalid on GitHub.com and throwing errors (see github-linguist/linguist#3924 for further details).

@infininight
Copy link
Member

Not sure I understand why this should throw an error, shouldn't any unrecognized keys just be ignored? Would have expected it to work something like CSS in that respect.

To answer the question this key is used in TextMate to hide the grammar (or bundle item in general) from the user. Since this grammar is only used for organizational purposes and should never be selected directly by the user we don't want it included in the selectable grammar list.

@pchaigno
Copy link
Contributor Author

pchaigno commented Jan 6, 2018

Not sure I understand why this should throw an error, shouldn't any unrecognized keys just be ignored? Would have expected it to work something like CSS in that respect.

Github.com now compiles grammars before using them for syntax highlighting. It's that compiler who is throwing an error (probably should be called a warning though). We're checking, for all these errors, that they are not actual mistakes as, otherwise, they might cause syntax highlighting bugs throughout github.com.

To answer the question this key is used in TextMate to hide the grammar (or bundle item in general) from the user. Since this grammar is only used for organizational purposes and should never be selected directly by the user we don't want it included in the selectable grammar list.

Thanks for the explanation, that makes sense! I'll whitelist this key.
Also, would you know where such keys are documented?

@infininight
Copy link
Member

infininight commented Jan 9, 2018

Thanks for the explanation, that makes sense! I'll whitelist this key.
Also, would you know where such keys are documented?

As this is intended to be a checkbox in the bundle editor GUI* there isn't really documentation for these sorts of keys as such.

* This specific key hasn't been added to the bundle editor yet as it's relatively new and not needed very often.

@infininight infininight closed this Jan 9, 2018
@pchaigno
Copy link
Contributor Author

pchaigno commented Jan 9, 2018

Ok. Thanks for the answer!

@pchaigno pchaigno deleted the remove-invalid-key branch January 9, 2018 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants