Documentation ¶
Overview ¶
Copyright (c) 2020 Denis Tingajkin
SPDX-License-Identifier: Apache-2.0
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 ¶
- type Analyzer
- type Calculable
- type Configuration
- type ConstValue
- type Issue
- type Location
- type Option
- type Reader
- func (r *Reader) Done() bool
- func (r *Reader) Finish() string
- func (r *Reader) Location() Location
- func (r *Reader) Next() rune
- func (r *Reader) Peek() rune
- func (r *Reader) Position() int
- func (r *Reader) ReadWhile(match func(rune) bool) string
- func (r *Reader) SetOffset(offset Location)
- func (r *Reader) SetPosition(pos int)
- type RegexpValue
- type Target
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { // Values is map of values. Supports two types 'const` and `regexp`. Values can be used recursively. Values map[string]map[string]string `yaml:"values"'` // Template is template for checking. Uses values. Template string `yaml:"template"` // TemplatePath path to the template file. Useful if need to load the template from a specific file. TemplatePath string `yaml:"template-path"` }
Configuration represents go-header linter setup parameters
func (*Configuration) GetTemplate ¶
func (c *Configuration) GetTemplate() (string, error)
func (*Configuration) Parse ¶
func (c *Configuration) Parse(p string) error
type ConstValue ¶
type ConstValue struct {
RawValue string
}
func (*ConstValue) Get ¶
func (c *ConstValue) Get() string
func (*ConstValue) Read ¶
func (c *ConstValue) Read(s *Reader) Issue
type Issue ¶
func NewIssueWithLocation ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithTemplate ¶
func WithValues ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func (*Reader) SetPosition ¶
type RegexpValue ¶
type RegexpValue struct {
RawValue string
}
func (*RegexpValue) Get ¶
func (r *RegexpValue) Get() string
func (*RegexpValue) Read ¶
func (r *RegexpValue) Read(s *Reader) Issue
type Value ¶
type Value interface { Calculable Read(*Reader) Issue }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.