-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Update YARA language config #4202
Conversation
@lildude Are you making progress on Lightshow? It would be good if we could test this. |
Unfortunately not. It's out of my hands at the moment. |
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.
Not sure why I thought we needed Lightshow here. It's not something Lightshow can test anyway.
lib/linguist/languages.yml
Outdated
extensions: | ||
- ".yar" | ||
- ".yara" | ||
tm_scope: source.yara | ||
ace_mode: c_cpp |
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.
@wesinator The syntax looks very different from C++. Did you check the output this mode produces for YARA? Could you add a screenshot?
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.
The comments, indentation, and bracketing are similar, but if it adds C/Cpp keywords then I'll change it back.
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.
@lildude Any way to test this?
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.
Nope, none what-so-ever, as as I've just discovered all the editors on the GitHub.com interface are now using CodeMirror (as of Sep 2016 and GitHub Enterprise 2.8 onwards) and reflected as such in the docs at https://help.github.com/articles/editing-files-in-your-repository/ and https://help.github.com/articles/about-gists/ and https://help.github.com/articles/using-keyboard-shortcuts/.
#3243 was the Linguist side of things that put the finishing touches in place.
So this line will have absolutely no effect on how things look in GitHub.com right now, though may in future as we may switch back to Ace, or other Ace-compatible editor, if it's deemed necessary to do so at some time in the future.
@wesinator If you want to make an effective change, you'll need to implement the codemirror_mode
and codemirror_mime_type
equivalents too.
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.
Nope, none what-so-ever, as as I've just discovered all the editors on the GitHub.com interface are now using CodeMirror
Oh, right. I forgot that!
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.
Ok, codemirror doesn't have a builtin YARA mode.
linguist doesn't use the language grammars for editing ?
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.
No, it uses CodeMirror.
This reverts commit 308cce2.
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.
Being a programming language, YARA will be displayed in language statistics so we'll need to add a color.
@pchaigno Done - that was not why the tests were failing though, I don't see why they would be failing. |
Description
These are more appropriate for the syntax
Checklist: