regressiontests

package
v2.0.3+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2018 License: MIT Imports: 12 Imported by: 0

README

Regression tests for gometalinter

These tests run specific linters through gometalinter and verify that they output what we expect from a particular piece of source code.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpectIssues

func ExpectIssues(t *testing.T, linter string, source string, expected Issues, extraFlags ...string)

ExpectIssues runs gometalinter and expects it to generate exactly the issues provided.

Types

type Issue

type Issue struct {
	Linter   string `json:"linter"`
	Severity string `json:"severity"`
	Path     string `json:"path"`
	Line     int    `json:"line"`
	Col      int    `json:"col"`
	Message  string `json:"message"`
}

func (*Issue) String

func (i *Issue) String() string

type Issues

type Issues []Issue

func RunLinter

func RunLinter(t *testing.T, linter string, path string, extraFlags ...string) Issues

RunLinter runs the gometalinter as a binary against the files at path and returns the issues it encountered

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL