diff --git a/analyzer.go b/analyzer.go index e336869..b7a5e8f 100644 --- a/analyzer.go +++ b/analyzer.go @@ -102,7 +102,10 @@ func (gas *Analyzer) Process(packagePaths ...string) error { AllowErrors: true, } for _, packagePath := range packagePaths { - abspath, _ := filepath.Abs(packagePath) + abspath, err := filepath.Abs(packagePath) + if err != nil { + return err + } gas.logger.Println("Searching directory:", abspath) basePackage, err := build.Default.ImportDir(packagePath, build.ImportComment) diff --git a/issue.go b/issue.go index 1060f43..2113529 100644 --- a/issue.go +++ b/issue.go @@ -76,7 +76,7 @@ func codeSnippet(file *os.File, start int64, end int64, n ast.Node) (string, err } size := (int)(end - start) // Go bug, os.File.Read should return int64 ... - file.Seek(start, 0) + file.Seek(start, 0) // #nosec buf := make([]byte, size) if nread, err := file.Read(buf); err != nil || nread != size {