lint

package module
v0.0.0-...-7affc28 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2014 License: BSD-3-Clause Imports: 11 Imported by: 0

README

Golint is a linter for Go source code.

This is forked from http://github.com/golang/lint and has the following alterations:

* Defaults to linting current directory if no arguments are supplied
* Removed all checks for documentation
* Removed all initialism checks
* Removed error string checks
* Ignores any source files in a proto directory (since this is used for autogenerated source files by protoc-gen-go)

To install, run:
  go get github.com/iand/lint/golint

To use, type:
  golint

or:
  golint <directory or file>  

See http://github.com/golang/lint for more documentation

Documentation

Overview

Package lint contains a linter for Go source code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Linter

type Linter struct {
}

A Linter lints Go source code.

func (*Linter) Lint

func (l *Linter) Lint(filename string, src []byte) ([]Problem, error)

Lint lints src.

type Problem

type Problem struct {
	Position   token.Position // position in source file
	Text       string         // the prose that describes the problem
	Confidence float64        // a value in (0,1] estimating the confidence in this problem's correctness
	LineText   string         // the source line
}

Problem represents a problem in some source code.

func (*Problem) String

func (p *Problem) String() string

Directories

Path Synopsis
golint lints the Go source files named on its command line.
golint lints the Go source files named on its command line.

Jump to

Keyboard shortcuts

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