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

Improve env shebang parsing to detect correct interpreter #58

Merged
merged 1 commit into from
Sep 25, 2021

Conversation

lafriks
Copy link
Collaborator

@lafriks lafriks commented Sep 25, 2021

As per Linguist commit github-linguist/linguist@de19dc1

Also remove unused function and adds additional test cases from Linguist

@lafriks lafriks added the enhancement New feature or request label Sep 25, 2021
@lafriks lafriks changed the title Improve shebang parsing to detect correct interpreter Improve env shebang parsing to detect correct interpreter Sep 25, 2021
@@ -111,13 +111,6 @@ func getFirstLanguageAndSafe(languages []string) (language string, safe bool) {
return
}

// getLanguageBySpecificClassifier returns the most probably language for the given content using
// classifier to detect language.
func getLanguageBySpecificClassifier(content []byte, candidates []string, classifier classifier) (language string, safe bool) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this function is not used anywhere in the code

Copy link
Member

@bzz bzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for spotting the unused function and 💪 unit-tests! LGTM

@bzz bzz merged commit 0ae7683 into go-enry:master Sep 25, 2021
@lafriks lafriks deleted the feat/improve_shebang branch September 25, 2021 20:56
@bzz bzz added this to the 2.7.2 milestone Sep 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

None yet

2 participants