mirror of
https://github.com/kevin-DL/revel-cmd.git
synced 2026-01-14 03:44:47 +00:00
More linting
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package parser2
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"go/ast"
|
||||
"go/parser"
|
||||
"go/scanner"
|
||||
@@ -150,7 +151,8 @@ func (s *SourceProcessor) processPath(path string, info os.FileInfo, err error)
|
||||
0)
|
||||
|
||||
if err != nil {
|
||||
if errList, ok := err.(scanner.ErrorList); ok {
|
||||
var errList scanner.ErrorList
|
||||
if errors.As(err, &errList) {
|
||||
pos := errList[0].Pos
|
||||
newError := &utils.SourceError{
|
||||
SourceType: ".go source",
|
||||
|
||||
Reference in New Issue
Block a user