Preparing report...

Report for github.com/Dynom/ERI

A+    Excellent!    Found 43 issues across 78 files

Tweet

gofmt100%

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

No problems detected. Good job!


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!


gocyclo98%

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.

    • ERI/validator/util.go
    • Line 164: warning: cyclomatic complexity 35 of function looksLikeValidLocalPart() is high (> 15) (gocyclo)
    • Line 217: warning: cyclomatic complexity 19 of function looksLikeValidDomain() is high (> 15) (gocyclo)

golint46%

Golint is a linter for Go source code.

    • ERI/cmd/web/persist/postgres.go
    • Line 15: warning: exported function New should have comment or be unexported (golint)
    • Line 22: warning: exported type Postgres should have comment or be unexported (golint)
    • Line 27: warning: exported method Postgres.Close should have comment or be unexported (golint)
    • Line 31: warning: exported method Postgres.Store should have comment or be unexported (golint)
    • Line 52: warning: exported method Postgres.Range should have comment or be unexported (golint)
    • ERI/cmd/web/erihttp/handlers/types.go
    • Line 7: warning: exported type Middleware should have comment or be unexported (golint)
    • Line 9: warning: exported type CustomResponseWriter should have comment or be unexported (golint)
    • Line 15: warning: exported function NewCustomResponseWriter should have comment or be unexported (golint)
    • Line 21: warning: exported method CustomResponseWriter.WriteHeader should have comment or be unexported (golint)
    • ERI/validator/timings.go
    • Line 5: warning: exported type Timings should have comment or be unexported (golint)
    • Line 7: warning: exported method Timings.Add should have comment or be unexported (golint)
    • Line 11: warning: exported type Timing should have comment or be unexported (golint)
    • ERI/validator/validator.go
    • Line 11: warning: exported type CheckFn should have comment or be unexported (golint)
    • Line 12: warning: exported type ArtifactFn should have comment or be unexported (golint)
    • Line 14: warning: exported function NewEmailAddressValidator should have comment or be unexported (golint)
    • Line 30: warning: exported type EmailValidator should have comment or be unexported (golint)
    • ERI/cmd/web/pubsub/gcp/interfaces.go
    • Line 9: warning: exported type Client should have comment or be unexported (golint)
    • Line 16: warning: exported type Topic should have comment or be unexported (golint)
    • Line 22: warning: exported type Subscription should have comment or be unexported (golint)
    • Line 30: warning: exported type Message should have comment or be unexported (golint)
    • ERI/cmd/eri-cli/commands/report.go
    • Line 16: warning: exported const RFFull should have comment (or a comment on this block) or be unexported (golint)
    • Line 25: warning: exported type ReportFormat should have comment or be unexported (golint)
    • Line 27: warning: exported type ReportSettings should have comment or be unexported (golint)
    • Line 35: warning: exported type Encoder should have comment or be unexported (golint)
    • ERI/cmd/web/preferrer/preferrer.go
    • Line 5: warning: exported type HasPreferred should have comment or be unexported (golint)
    • Line 9: warning: exported type Mapping should have comment or be unexported (golint)
    • Line 11: warning: exported function New should have comment or be unexported (golint)
    • Line 17: warning: exported type Preferrer should have comment or be unexported (golint)
    • ERI/validator/validations/flags.go
    • Line 6: warning: comment on exported const FValid should be of the form "FValid ..." (golint)
    • Line 9: warning: exported const FSyntax should have comment (or a comment on this block) or be unexported (golint)
    • Line 17: warning: exported type Flag should have comment or be unexported (golint)
    • Line 19: warning: exported method Flag.AsStringSlice should have comment or be unexported (golint)
    • ERI/cmd/eri-cli/werkit/werkit.go
    • Line 11: warning: exported type CheckTask should have comment or be unexported (golint)
    • Line 17: warning: exported type WerkIt should have comment or be unexported (golint)
    • Line 22: warning: exported method WerkIt.StartCheckWorkers should have comment or be unexported (golint)
    • Line 34: warning: exported method WerkIt.Wait should have comment or be unexported (golint)
    • Line 39: warning: exported method WerkIt.Process should have comment or be unexported (golint)
    • ERI/cmd/web/erihttp/server.go
    • Line 24: warning: exported function NewServer should have comment or be unexported (golint)
    • Line 75: warning: exported type Server should have comment or be unexported (golint)
    • Line 80: warning: exported method Server.ServeERI should have comment or be unexported (golint)
    • Line 84: warning: exported method Server.Close should have comment or be unexported (golint)
    • ERI/cmd/web/handlers.go
    • Line 26: warning: exported function NewAutoCompleteHandler should have comment or be unexported (golint)
    • Line 185: warning: exported function NewHealthHandler should have comment or be unexported (golint)
    • ERI/runtimer/signal.go
    • Line 9: warning: exported type Callback should have comment or be unexported (golint)
    • Line 11: warning: exported function New should have comment or be unexported (golint)
    • Line 26: warning: exported type SignalHandler should have comment or be unexported (golint)
    • Line 47: warning: exported method SignalHandler.RegisterCallback should have comment or be unexported (golint)
    • ERI/cmd/eri-cli/commands/types.go
    • Line 10: warning: exported type ReportStats should have comment or be unexported (golint)
    • Line 16: warning: exported type CheckResultFull should have comment or be unexported (golint)
    • Line 51: warning: exported type CheckSettings should have comment or be unexported (golint)
    • ERI/testutil/context.go
    • Line 8: warning: exported function NewContext should have comment or be unexported (golint)
    • Line 14: warning: exported type Context should have comment or be unexported (golint)
    • Line 19: warning: exported type ErrEvalFn should have comment or be unexported (golint)
    • Line 21: warning: exported method Context.Deadline should have comment or be unexported (golint)
    • Line 25: warning: exported method Context.Done should have comment or be unexported (golint)
    • Line 29: warning: exported method Context.SetParent should have comment or be unexported (golint)
    • Line 39: warning: exported method Context.Err should have comment or be unexported (golint)
    • Line 47: warning: exported method Context.Value should have comment or be unexported (golint)
    • ERI/testutil/hash.go
    • Line 3: warning: exported type MockHasherReverse should have comment or be unexported (golint)
    • Line 7: warning: exported method MockHasherReverse.Sum should have comment or be unexported (golint)
    • Line 16: warning: exported type MockHasher should have comment or be unexported (golint)
    • Line 25: warning: exported method MockHasher.Sum should have comment or be unexported (golint)
    • Line 29: warning: exported method MockHasher.Reset should have comment or be unexported (golint)
    • Line 33: warning: exported method MockHasher.Size should have comment or be unexported (golint)
    • Line 37: warning: exported method MockHasher.BlockSize should have comment or be unexported (golint)
    • ERI/cmd/web/hitlist/hitlist.go
    • Line 16: warning: exported var ErrInvalidDomainSyntax should have comment or be unexported (golint)
    • Line 20: warning: exported type Hits should have comment or be unexported (golint)
    • Line 21: warning: exported type Domain should have comment or be unexported (golint)
    • Line 22: warning: exported type Hit should have comment or be unexported (golint)
    • Line 28: warning: exported type Recipient should have comment or be unexported (golint)
    • Line 31: warning: exported function New should have comment or be unexported (golint)
    • Line 42: warning: exported type HitList should have comment or be unexported (golint)
    • Line 91: warning: exported method HitList.GetDomainValidationDetails should have comment or be unexported (golint)
    • Line 161: warning: exported method HitList.Add should have comment or be unexported (golint)
    • ERI/cmd/web/persist/memory.go
    • Line 12: warning: exported function NewMemory should have comment or be unexported (golint)
    • Line 18: warning: exported type Memory should have comment or be unexported (golint)
    • Line 22: warning: exported method Memory.Close should have comment or be unexported (golint)
    • Line 26: warning: exported method Memory.Store should have comment or be unexported (golint)
    • Line 35: warning: exported method Memory.Range should have comment or be unexported (golint)
    • ERI/validator/util.go
    • Line 17: warning: exported var ErrInvalidHost should have comment or be unexported (golint)
    • Line 42: warning: exported function WithDialer should have comment or be unexported (golint)
    • Line 52: warning: exported function WithDeadlineCTX should have comment or be unexported (golint)
    • ERI/cmd/web/erihttp/types.go
    • Line 6: warning: exported var ErrMissingBody should have comment or be unexported (golint)
    • Line 16: warning: exported type ERIResponse should have comment or be unexported (golint)
    • Line 22: warning: exported type AutoCompleteResponse should have comment or be unexported (golint)
    • Line 27: warning: exported method AutoCompleteResponse.PrepareResponse should have comment or be unexported (golint)
    • Line 33: warning: exported type SuggestResponse should have comment or be unexported (golint)
    • Line 39: warning: exported method SuggestResponse.PrepareResponse should have comment or be unexported (golint)
    • Line 45: warning: exported type AutoCompleteRequest should have comment or be unexported (golint)
    • Line 49: warning: exported type SuggestRequest should have comment or be unexported (golint)
    • ERI/cmd/web/pubsub/types.go
    • Line 5: warning: exported type Notification should have comment or be unexported (golint)
    • Line 10: warning: exported type Data should have comment or be unexported (golint)
    • ERI/types/email.go
    • Line 9: warning: exported var ErrInvalidEmailAddress should have comment or be unexported (golint)
    • Line 32: warning: exported type EmailParts should have comment or be unexported (golint)
    • ERI/cmd/web/pubsub/gcp/pubsub.go
    • Line 17: warning: exported function NewPubSubSvc should have comment or be unexported (golint)
    • Line 44: warning: exported type NotifyFn should have comment or be unexported (golint)
    • Line 46: warning: exported type PubSubSvc should have comment or be unexported (golint)
    • Line 55: warning: exported method PubSubSvc.Close should have comment or be unexported (golint)
    • Line 83: warning: exported method PubSubSvc.Publish should have comment or be unexported (golint)
    • ERI/validator/interfaces.go
    • Line 8: warning: exported type LookupMX should have comment or be unexported (golint)
    • Line 12: warning: exported type DialContext should have comment or be unexported (golint)
    • ERI/validator/types.go
    • Line 12: warning: exported type Artifact should have comment or be unexported (golint)
    • Line 25: warning: exported type Result should have comment or be unexported (golint)
    • Line 30: warning: exported type Details should have comment or be unexported (golint)
    • Line 36: warning: exported method Result.ValidatorsRan should have comment or be unexported (golint)
    • Line 40: warning: exported method Result.HasValidStructure should have comment or be unexported (golint)
    • ERI/cmd/web/services/autocomplete.go
    • Line 13: warning: exported var ErrEmptyInput should have comment or be unexported (golint)
    • Line 17: warning: exported function NewAutocompleteService should have comment or be unexported (golint)
    • Line 26: warning: exported type AutocompleteSvc should have comment or be unexported (golint)
    • Line 33: warning: exported type AutocompleteResult should have comment or be unexported (golint)
    • Line 37: warning: exported method AutocompleteSvc.Autocomplete should have comment or be unexported (golint)
    • ERI/cmd/web/services/suggest.go
    • Line 18: warning: exported function NewSuggestService should have comment or be unexported (golint)
    • Line 31: warning: exported type SuggestSvc should have comment or be unexported (golint)
    • Line 38: warning: exported type SuggestResult should have comment or be unexported (golint)
    • Line 45: warning: exported method SuggestSvc.Suggest should have comment or be unexported (golint)
    • ERI/cmd/web/config/config.go
    • Line 15: warning: exported var VTStructure should have comment or be unexported (golint)
    • Line 22: warning: exported function NewConfig should have comment or be unexported (golint)
    • Line 121: warning: exported type Preferred should have comment or be unexported (golint)
    • Line 136: warning: exported method Preferred.Set should have comment or be unexported (golint)
    • Line 155: warning: exported type Headers should have comment or be unexported (golint)
    • Line 170: warning: exported method Headers.Set should have comment or be unexported (golint)
    • Line 189: warning: exported type ValidatorType should have comment or be unexported (golint)
    • Line 195: warning: exported method ValidatorType.Set should have comment or be unexported (golint)
    • Line 200: warning: exported type ValidatorTypes should have comment or be unexported (golint)
    • Line 202: warning: exported method ValidatorTypes.AsStringSlice should have comment or be unexported (golint)
    • Line 211: warning: exported method ValidatorType.UnmarshalText should have comment or be unexported (golint)
    • Line 226: warning: exported type Duration should have comment or be unexported (golint)
    • Line 234: warning: exported method Duration.Set should have comment or be unexported (golint)
    • Line 240: warning: exported method Duration.AsDuration should have comment or be unexported (golint)
    • Line 244: warning: exported method Duration.UnmarshalText should have comment or be unexported (golint)
    • Line 250: warning: exported type LogFormat should have comment or be unexported (golint)
    • Line 256: warning: exported method LogFormat.Set should have comment or be unexported (golint)
    • Line 261: warning: exported method LogFormat.UnmarshalText 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!


misspell98%

Misspell Finds commonly misspelled English words