Preparing report...

Report for github.com/txn2/txeh

D    Needs lots of improvement    Found 8 issues across 10 files

Tweet

gofmt0%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

An error occurred while running this test (fork/exec /home/shawn/mygo/bin/gometalinter: cannot allocate memory)


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gocyclo100%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.

No problems detected. Good job!


golint20%

Golint is a linter for Go source code.

    • txeh/util/cmd/remove_ip.go
    • Line 26: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 40: warning: exported function RemoveIPs should have comment or be unexported (golint)
    • txeh/txeh.go
    • Line 11: warning: exported const UNKNOWN should have comment or be unexported (golint)
    • Line 12: warning: exported const EMPTY should have comment or be unexported (golint)
    • Line 13: warning: exported const COMMENT should have comment or be unexported (golint)
    • Line 14: warning: exported const ADDRESS should have comment or be unexported (golint)
    • Line 16: warning: comment on exported type HostsConfig should be of the form "HostsConfig ..." (with optional leading article) (golint)
    • Line 22: warning: comment on exported type Hosts should be of the form "Hosts ..." (with optional leading article) (golint)
    • Line 36: warning: comment on exported type HostFileLines should be of the form "HostFileLines ..." (with optional leading article) (golint)
    • Line 39: warning: comment on exported type HostFileLine should be of the form "HostFileLine ..." (with optional leading article) (golint)
    • Line 169: warning: comment on exported method Hosts.RemoveFirstHost should be of the form "RemoveFirstHost ..." (golint)
    • Line 270: warning: comment on exported method Hosts.RenderHostsFile should be of the form "RenderHostsFile ..." (golint)
    • Line 284: warning: comment on exported method Hosts.GetHostFileLines should be of the form "GetHostFileLines ..." (golint)
    • Line 292: warning: comment on exported function ParseHosts should be of the form "ParseHosts ..." (golint)
    • txeh/util/cmd/add.go
    • Line 30: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 44: warning: exported function AddHosts should have comment or be unexported (golint)
    • txeh/util/cmd/remove_cidr.go
    • Line 27: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 41: warning: exported function RemoveIPRanges should have comment or be unexported (golint)
    • txeh/util/cmd/remove_host.go
    • Line 26: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 40: warning: exported function RemoveHosts should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell90%

Misspell Finds commonly misspelled English words