From 583f8a28333fcb59039b381b47bfd8da357a9b17 Mon Sep 17 00:00:00 2001 From: Ben Boyter Date: Tue, 14 Aug 2018 07:58:01 +1000 Subject: [PATCH] Remove redundant work --- processor/file.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/processor/file.go b/processor/file.go index b7226900e..a3f89dcab 100644 --- a/processor/file.go +++ b/processor/file.go @@ -112,11 +112,9 @@ func walkDirectoryParallel(root string, output *chan *FileJob) { } } else { if gitignoreerror != nil || !gitignore.Match(filepath.Join(root, f.Name()), false) { - extension := getExtension(f.Name()) - language, ok := extensionLookup[extension] - + extension := "" // Lookup in case the full name matches - language, ok = extensionLookup[strings.ToLower(f.Name())] + language, ok := extensionLookup[strings.ToLower(f.Name())] // If no match check if we have a matching extension if !ok {