-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add Unity3D Asset and Metadata files #2388
Conversation
- .unity | ||
tm_scope: source.yaml | ||
|
||
Unity3D Metadata: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you want to make a separate language for Unity3D Metadata? It looks like it has the same YAML syntax as the other files...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, good point. I'll fold it in.
@pchaigno Updated with *.meta as part of the Unity3D Asset language definition. |
# Return true or false | ||
def generated_unity3d_meta? | ||
return false unless extname == '.meta' | ||
return lines[0].include?("fileFormatVersion: ") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should check for the number of lines: return false unless lines.count > 1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Thanks for this @mephaust. For good housekeeping would you mind adding an example file for each of the extensions as you have for |
@arfon Added more samples. |
👍 thanks @mephaust. This looks good to go. |
Add Unity3D Asset and Metadata files
These changes should be live in GitHub on the next release of Linguist |
Examples of in-the-wild usage on GitHub: