Skip to content

Commit 9e35a44

Browse files
committed
add a note about previewing each file for enry
1 parent 459696c commit 9e35a44

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

pkg/comments/comments.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,8 @@ type Comment struct {
7070

7171
// SearchFile searches a file for comments. It infers the language
7272
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-
// }
73+
// TODO right now, enry only infers the language based on the file extension
74+
// we should add some "preview" bytes from the file so that it has some sample content to examine
7775
lang := Language(enry.GetLanguage(filepath.Base(filePath), nil))
7876
if enry.IsVendor(filePath) {
7977
return nil

0 commit comments

Comments
 (0)