From f93d23ea8208cab566e5a4dc7ac98f212ae5c60d Mon Sep 17 00:00:00 2001 From: Alexander Bezzubov Date: Mon, 4 Feb 2019 21:27:49 +0100 Subject: [PATCH] address review feedback Signed-off-by: Alexander Bezzubov --- enry.go | 7 +++---- utils.go | 5 ++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/enry.go b/enry.go index cce1ff6b..d99b8eb1 100644 --- a/enry.go +++ b/enry.go @@ -1,7 +1,3 @@ -package enry // import "gopkg.in/src-d/enry.v1" - -//go:generate make code-generate - /* Package enry implements multiple strategies for programming language identification. @@ -15,3 +11,6 @@ package enry // import "gopkg.in/src-d/enry.v1" Upstream Linguist YAML files are used to generate datastructures for data package. */ +package enry // import "gopkg.in/src-d/enry.v1" + +//go:generate make code-generate diff --git a/utils.go b/utils.go index 76fe08a4..94a18999 100644 --- a/utils.go +++ b/utils.go @@ -51,9 +51,8 @@ func IsDocumentation(path string) bool { // IsDotFile returns whether or not path has dot as a prefix. func IsDotFile(path string) bool { - path = filepath.Clean(path) - base := filepath.Base(path) - return strings.HasPrefix(base, ".") && base != "." && base != ".." + base := filepath.Base(filepath.Clean(path)) + return strings.HasPrefix(base, ".") && base != "." } // IsVendor returns whether or not path is a vendor path.