Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Analyzer ¶
type Analyzer struct { Name string Run func(pass *Pass) (interface{}, error) Doc string Flags flag.FlagSet Requires []*Analyzer ResultType reflect.Type }
Analyzer is an analyzer for .graphql file. It is inspired by golang.org/x/tools/go/analysis.Analyzer.
type Comment ¶
Comment represents a comment line of a graphql file.
func ReadComments ¶
ReadComments reads comments from src. Ofcourse, src is io.Reader better than *ast.Source but it use *ast.Soruce for compatibility with gqlparser. Unfortunately, gqlparser does not toknize comments. See: https://github.com/vektah/gqlparser/issues/145
type Diagnostic ¶
A Diagnostic is a message associated with a source location.
type Pass ¶
type Pass struct { Analyzer *Analyzer Schema *ast.Schema Queries []*ast.QueryDocument Comments []*Comment Report func(*Diagnostic) ResultOf map[*Analyzer]interface{} }
A Pass provides information to the Run function that applies a specific analyzer. The Run function should not call any of the Pass functions concurrently.
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
internal
|
|
Package multichecker defines the main function for an analysis driver with several analyzers.
|
Package multichecker defines the main function for an analysis driver with several analyzers. |
Click to show internal directories.
Click to hide internal directories.