flint

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2014 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BootstrapNotFoundError = &LintError{
	1,
	"Bootstrap script not found",
}
View Source
var BootstrapNotFoundInfo = &LintError{
	0,
	"A bootstrap script makes setup a snap. http://bit.ly/JZjVL6",
}
View Source
var ContributingNotFoundError = &LintError{
	2,
	"CONTRIBUTING guide not found",
}
View Source
var ContributingNotFoundInfo = &LintError{
	0,
	"Add a guide for potential contributors. http://git.io/z-TiGg",
}
View Source
var LicenseNotFoundError = &LintError{
	2,
	"LICENSE not found",
}
View Source
var LicenseNotFoundInfo = &LintError{
	0,
	"Add a license to protect yourself and your users. http://choosealicense.com/",
}
View Source
var ReadmeNotFoundError = &LintError{
	2,
	"README not found",
}
View Source
var ReadmeNotFoundInfo = &LintError{
	0,
	"Every project begins with a README. http://bit.ly/1dqUYQF",
}
View Source
var TestScriptNotFoundError = &LintError{
	1,
	"Test script not found",
}
View Source
var TestScriptNotFoundInfo = &LintError{
	0,
	"Make it easy to run the test suite regardless of project type. http://bit.ly/JZjVL6",
}

Functions

func NewApp added in v0.0.4

func NewApp() *cli.App

Types

type Flags added in v0.0.4

type Flags struct {
	RunReadme       bool
	RunContributing bool
	RunLicense      bool
	RunBootstrap    bool
	RunTestScript   bool
}

type GitHubFetcher added in v0.0.4

type GitHubFetcher struct {
	*octokit.Client
}

func NewGitHubFetcher added in v0.0.4

func NewGitHubFetcher() *GitHubFetcher

func NewGitHubFetcherWithToken added in v0.0.4

func NewGitHubFetcherWithToken(token string) *GitHubFetcher

func (*GitHubFetcher) FetchRepository added in v0.0.4

func (g *GitHubFetcher) FetchRepository(nwo string) (repo *Repository, err error)

func (*GitHubFetcher) FetchTree added in v0.0.4

func (g *GitHubFetcher) FetchTree(nwo string) (paths []string, err error)

func (*GitHubFetcher) ParseFullName added in v0.0.4

func (g *GitHubFetcher) ParseFullName(nwo string) (owner, name string, err error)

type LintError added in v0.0.4

type LintError struct {
	Level   int
	Message string
}

func (*LintError) Error added in v0.0.4

func (e *LintError) Error() (out string)

type Linter added in v0.0.4

type Linter struct{}

func (*Linter) Run added in v0.0.4

func (l *Linter) Run(p Project, flags *Flags) (summary *Summary, err error)

type LocalProject added in v0.0.4

type LocalProject struct {
	Path string
}

func (*LocalProject) CheckBootstrap added in v0.0.4

func (l *LocalProject) CheckBootstrap() bool

func (*LocalProject) CheckContributing added in v0.0.4

func (l *LocalProject) CheckContributing() bool

func (*LocalProject) CheckLicense added in v0.0.4

func (l *LocalProject) CheckLicense() bool

func (*LocalProject) CheckReadme added in v0.0.4

func (l *LocalProject) CheckReadme() bool

func (*LocalProject) CheckTestScript added in v0.0.4

func (l *LocalProject) CheckTestScript() bool

type Project added in v0.0.4

type Project interface {
	CheckReadme() bool
	CheckContributing() bool
	CheckLicense() bool
	CheckBootstrap() bool
	CheckTestScript() bool
}

type RemoteProject added in v0.0.4

type RemoteProject struct {
	FullName string

	Repository
	// contains filtered or unexported fields
}

func (*RemoteProject) CheckBootstrap added in v0.0.4

func (l *RemoteProject) CheckBootstrap() bool

func (*RemoteProject) CheckContributing added in v0.0.4

func (l *RemoteProject) CheckContributing() bool

func (*RemoteProject) CheckLicense added in v0.0.4

func (l *RemoteProject) CheckLicense() bool

func (*RemoteProject) CheckReadme added in v0.0.4

func (l *RemoteProject) CheckReadme() bool

func (*RemoteProject) CheckTestScript added in v0.0.4

func (l *RemoteProject) CheckTestScript() bool

func (*RemoteProject) Fetch added in v0.0.4

func (r *RemoteProject) Fetch(fetcher RemoteRepositoryFetcher) error

type RemoteRepositoryFetcher added in v0.0.4

type RemoteRepositoryFetcher interface {
	FetchRepository(string) (*Repository, error)
	FetchTree(string) ([]string, error)
}

type Repository added in v0.0.4

type Repository struct {
	Description string
	Homepage    string
}

type Summary added in v0.0.4

type Summary struct {
	Errors []*LintError
}

func (*Summary) AppendError added in v0.0.4

func (list *Summary) AppendError(err *LintError)

func (*Summary) Print added in v0.0.4

func (l *Summary) Print(out io.Writer, colored bool)

func (*Summary) Severity added in v0.0.4

func (list *Summary) Severity() int

Jump to

Keyboard shortcuts

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