Documentation ¶
Overview ¶
(c) Copyright 2016 Hewlett Packard Enterprise Development LP
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func GetChar(n ast.Node) (byte, error)
- func GetFloat(n ast.Node) (float64, error)
- func GetInt(n ast.Node) (int64, error)
- func GetString(n ast.Node) (string, error)
- func MatchCall(n ast.Node, r *regexp.Regexp) *ast.CallExpr
- func MatchCompLit(n ast.Node, r *regexp.Regexp) *ast.CompositeLit
- func Select(s Selector, n ast.Node, bits ...reflect.Type)
- func SimpleSelect(n ast.Node, bits ...reflect.Type) ast.Node
- func TryResolve(n ast.Node, c *Context) bool
- type Analyzer
- type Context
- type Issue
- type MetaData
- type Metrics
- type Rule
- type RuleSet
- type Score
- type SelectFunc
- type Selector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MatchCompLit ¶
Types ¶
type Analyzer ¶
type Analyzer struct { Issues []Issue `json:"issues"` Stats Metrics `json:"metrics"` // contains filtered or unexported fields }
func (*Analyzer) ProcessSource ¶
type Issue ¶
type SelectFunc ¶
A selector function. This is like a visitor, but has a richer interface. It is called with the current ast.Node being visitied and that nodes depth in the tree. The function can return true to continue traversing the tree, or false to end traversal here.