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.