Some linters don't even need the *loader.Program
, for example lll quite happily just opens and scans the raw source files to find overly long lines.
How would such linters integrate with lint? Or to put it the other way around: How would lint integrate with tools from the Go linter ecosystem like gometalinter?
A) lint could attempt to support all kinds of linters, even those that operate on a different level (like line-length, spell-checking etc.) and do not actually benefit from receiving parsed Go code. This way, lint would become kind of a "better" (i.e. more efficient) version of gometalinter.
B) lint could focus on optimizing performance of linters that actually rely on go/loader (and possibly ssa) and become a metalinter for just those linters. In that case, how would lint integrate with already widely used tools like gometalinter?
If A), linters need a way to specify their expectations (see #5). This way, we can decide what we actually need to provide to the requested linters.
If B), I would propose that lint does not only implement a metalinter command that runs all supported linters, but rather also an API that allows for metalinters with broader scope (like gometalinter) to call all linters that lint supports and collect the output in a reasonable way (through the lint interface, not plain text).