fixhub

package module
v0.0.0-...-72eabce Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2014 License: Apache-2.0 Imports: 12 Imported by: 0

README

Fixhub

Fixhub runs golint on a GitHub repository.

To install, run

   go get github.com/dsymonds/fixhub/cmd/fixhub

Invoke fixhub with a GitHub repo name (e.g. dsymonds/fixhub).

   fixhub golang/lint

You might need a personal access token to avoid getting rate limited. Visit https://github.com/settings/applications and create one with the public_repo permission. Store it in $HOME/.fixhub-token file.

Documentation

Overview

Package fixhub implements infrastructure for checking GitHub repositories containing Go source files, and generating fixes for the problems.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	FetchParallelism int // max fetches to do at once in an operation
	// contains filtered or unexported fields
}

Client is a client for interacting with GitHub repositories.

func NewClient

func NewClient(owner, repo, accessToken string) (*Client, error)

NewClient returns a new client. If accessToken is empty then the client will be unauthenticated.

func (*Client) Check

func (c *Client) Check(rev string) (Problems, error)

Check runs checks on the Go source files at the named revision.

func (*Client) GetBlob

func (c *Client) GetBlob(sha1 string) ([]byte, error)

GetBlob fetches the repository blob by SHA-1 ID.

func (*Client) GetTree

func (c *Client) GetTree(sha1 string) (*github.Tree, error)

GetTree fetches the github tree by SHA-1 commit ID.

func (*Client) ResolveRef

func (c *Client) ResolveRef(ref string) (sha1 string, err error)

ResolveRef resolves the given ref into the SHA-1 commit ID.

type Problem

type Problem struct {
	File string
	Line int    // line number, starting at 1
	Text string // the prose that describes the problem
}

A Problem is something that was found wrong.

func (Problem) String

func (p Problem) String() string

type Problems

type Problems []Problem

Problems is a slice of Problem. It satisfies sort.Interface.

func (Problems) Len

func (ps Problems) Len() int

func (Problems) Less

func (ps Problems) Less(i, j int) bool

func (Problems) Swap

func (ps Problems) Swap(i, j int)

Directories

Path Synopsis
cmd
fixhub
Fixhub tries to fix a GitHub repository containing Go source files.
Fixhub tries to fix a GitHub repository containing Go source files.
fixhubd
The binary fixhubd is a server to fix GitHub repositories.
The binary fixhubd is a server to fix GitHub repositories.

Jump to

Keyboard shortcuts

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