Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't require relative paths to start with ./ or ../
Errors reported by Go, even when containing relative paths, do not always begin with ./ or ../ – for example: $ go build ./... # honnef.co/go/tools/lintcmd lintcmd/format.go:28:8: syntax error: cannot use path := filepath.Clean(pos.Filename) as value We could require either ./, ../ or at least one path separator and still match Go's output. However, commonly used linters (such as Staticcheck and golint) never use ./ for relative paths. Their output stopped being matched when we moved from v1 to v2. I believe that being able to match the output of linters is worth relaxing the pattern for. This change slightly relaxes the stricter pattern that was introduced as part of v2 to address actions#46. However, the pattern is still stricter than it was in v1 and as strict as it can be for most users.
- Loading branch information