Closed
Description
Hello,
Describe the bug
When you run Revive on a project that has an invalid go source file, it fails because it can't read the AST.
To Reproduce
Steps to reproduce the behavior:
- Create an invalid go source file, such as:
package main
import "fmt"
func example() {
ok := 1
if ok == 1 {
fmt.Print("OK")
}
- I run it with the following flags & no configuration file:
revive -formatter json
Expected behavior
Instead of failing the entire analysis, Revive could add the AST parsing error to the revive failures list and output it at the end along with other failures.
Logs
Current output:
example.go:10:3: expected '}', found 'EOF'
with exit status 1