-
-
Notifications
You must be signed in to change notification settings - Fork 137
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 a bunch more extensions #12
Conversation
identify/extensions.py
Outdated
'bat': {'text', 'batch'}, | ||
'bz2': {'binary', 'bzip2'}, | ||
'c': {'text', 'c'}, | ||
'cc': {'text', 'c++'}, | ||
'cfg': {'text', 'conf'}, |
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.
This is probably going to change the parsing of setup.cfg
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.
yeah, not sure what to do. obviously .conf
/.cfg
/.cnf
represent tons of different file formats
maybe we should just omit it (or just have {'text'}
) since you can't reliably assume anything based on the type?
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 was meaning towards omission as well (why I didn't fill out . txt). Maybe we just leave these as text and give higher priority to the named 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.
Leaning*
identify/extensions.py
Outdated
'png': {'binary', 'image', 'png'}, | ||
'po': {'text', 'pofile'}, | ||
'pp': {'text', 'puppet'}, | ||
'proto': {'binary', 'proto'}, |
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.
Hmmm i thought these were text 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.
yup they are, oops
@asottile made filename matches take precedence over extension matches so that, for example, |
These come from cloning the 50 most starred GitHub repos and picking out extensions that seem like they should be added.