-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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 ability to recognize dockerfiles with extensions #4567
Conversation
@lildude, please review |
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 the report and pull request @kmehant!
Could you also add sample files in samples/Dockerfile/filenames/
for the new filenames you're adding? We prefer sample files to be from "real" application (not hello worlds, etc.) and under permissive license.
@@ -1110,6 +1110,9 @@ Dockerfile: | |||
- ".dockerfile" | |||
filenames: | |||
- Dockerfile | |||
- "dockerfile" | |||
- "Dockerfile.*" | |||
- "dockerfile.*" |
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.
That's not going to work. You'll have to give the explicit name.
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.
@@ -1110,6 +1110,9 @@ Dockerfile: | |||
- ".dockerfile" | |||
filenames: | |||
- Dockerfile | |||
- "dockerfile" |
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.
Is the lower-case D common? I've never encountered it before.
@lildude Any way we can search for that on GitHub.com? Maybe through Google BigQuery?
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 on GitHub itself as there's no case-sensitive search. I have no idea about BigQuery - never used it.
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 have no idea about BigQuery - never used it.
I have now. 🎉
There are only 403 instances dockerfile
in the BigQuery dataset according to this query:
SELECT repo_name, path
FROM `bigquery-public-data.github_repos.files`
WHERE path LIKE '%/dockerfile'
GROUP BY repo_name, path
LIMIT 5000
There are well over 5000 examples of Dockerfile
though 😄
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 have no idea about BigQuery - never used it.
I have now. 🎉
Wow! How did you do that so quickly? Is there a good tutorial for that? It would definitely improve our ability to asses in-the-wild usage.
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 searched Google, found https://codelabs.developers.google.com/codelabs/bigquery-github/index.html?index=..%2F..index#0, signed into my work GCP account (I was already signed in, but could have used my personal account too) and put my terrible SQL skills to work 😁.
🤔 Other than the case of Additionally, there are waaaay too many variations of |
How about the extensions such as Dockerfile.something or simply Dockerfile.* How about this. I am sure such are used widely |
They are, however you can't use wildcards or a regex for the filename strategy... only precise names can be used. |
Oh! I get it now then I think this is unresolvable as we can never have GitHub recognize Dockerfile.* files. Then let's close this PR |
We can probably recognize the most common one. |
This pull request has been automatically marked as stale because it has not had recent activity, and will be closed if no further activity occurs. If this pull request was overlooked, forgotten, or should remain open for any other reason, please reply here to call attention to it and remove the stale status. Thank you for your contributions. |
This pull request has been automatically closed because it has not had activity in a long time. Please feel free to reopen it or create a new issue. |
Description
Fixes #4566
Checklist:
I am associating a language with a new file extension.
I am adding a new language.
I am fixing a misclassified language
I am changing the source of a syntax highlighting grammar
I am updating a grammar submodule
I am adding new or changing current functionality
I am changing the color associated with a language