Commit graph

6 commits

Author SHA1 Message Date
Dominik Honnef
ec55db560e 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 #46. However, the pattern is still stricter
than it was in v1 and as strict as it can be for most users.
2021-01-16 04:49:09 +01:00
Bryan MacFarlane
e36ce1d6cf tabs or spaces 2020-03-30 10:46:01 -04:00
Bryan MacFarlane
89c89c5036 cleaner regex 2020-03-30 10:39:29 -04:00
Bryan MacFarlane
0a62a734da another test case 2020-03-30 09:12:21 -04:00
Bryan MacFarlane
34223181a5 starting 2020-03-27 19:56:10 -04:00
Bryan MacFarlane
4282769cc0 starting v2 and proxy support 2020-02-09 00:21:39 -05:00
Renamed from .github/go.json (Browse further)