We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 459696c commit 9e35a44Copy full SHA for 9e35a44
pkg/comments/comments.go
@@ -70,10 +70,8 @@ type Comment struct {
70
71
// SearchFile searches a file for comments. It infers the language
72
func SearchFile(filePath string, reader io.Reader, cb func(*Comment)) error {
73
- // src, err := ioutil.ReadAll(reader)
74
- // if err != nil {
75
- // return nil, err
76
- // }
+ // TODO right now, enry only infers the language based on the file extension
+ // we should add some "preview" bytes from the file so that it has some sample content to examine
77
lang := Language(enry.GetLanguage(filepath.Base(filePath), nil))
78
if enry.IsVendor(filePath) {
79
return nil
0 commit comments