Denis Isaev 3d78f64b60 fix #522: run misspell in text mode
Treat Go source files as plain text files by misspell: it allows detecting
issues in strings, variable names, etc. Also, it's the default mode of
a standalone misspell tool.

Also, implement richer and more stable auto-fix of misspell issues:
now it can fix multiple issues in one line.
2019-06-09 20:14:19 +03:00

34 lines
901 B
Go

package linter
import (
"golang.org/x/tools/go/loader"
"golang.org/x/tools/go/packages"
"golang.org/x/tools/go/ssa"
"github.com/golangci/golangci-lint/pkg/fsutils"
"github.com/golangci/golangci-lint/pkg/config"
"github.com/golangci/golangci-lint/pkg/lint/astcache"
"github.com/golangci/golangci-lint/pkg/logutils"
)
type Context struct {
Packages []*packages.Package
NotCompilingPackages []*packages.Package
LoaderConfig *loader.Config // deprecated, don't use for new linters
Program *loader.Program // deprecated, use Packages for new linters
SSAProgram *ssa.Program // for unparam and interfacer but not for megacheck (it change it)
Cfg *config.Config
ASTCache *astcache.Cache
FileCache *fsutils.FileCache
LineCache *fsutils.LineCache
Log logutils.Log
}
func (c *Context) Settings() *config.LintersSettings {
return &c.Cfg.LintersSettings
}