Report for github.com/jniedrauer/logs-to-elastic

A    Great!    Found 21 issues across 21 files

Tweet

gofmt90%

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


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!


golint47%

Golint is a linter for Go source code.

    • logs-to-elastic/internal/pkg/conf/conf.go
    • Line 1: warning: package comment should be of the form "Package conf ..." (golint)
    • Line 15: warning: comment on exported type Config should be of the form "Config ..." (with optional leading article) (golint)
    • Line 24: warning: comment on exported function NewConfig should be of the form "NewConfig ..." (golint)
    • Line 51: warning: comment on exported function GetEnvOrDefault should be of the form "GetEnvOrDefault ..." (golint)
    • Line 60: warning: comment on exported function GetEnvOrFatal should be of the form "GetEnvOrFatal ..." (golint)
    • logs-to-elastic/internal/pkg/awsapi/s3.go
    • Line 1: warning: package comment should be of the form "Package awsapi ..." (golint)
    • Line 15: warning: exported type S3Client should have comment or be unexported (golint)
    • Line 19: warning: comment on exported method S3Client.Get should be of the form "Get ..." (golint)
    • Line 38: warning: exported type MockS3Iface should have comment or be unexported (golint)
    • Line 42: warning: exported method MockS3Iface.Download should have comment or be unexported (golint)
    • Line 47: warning: exported method MockS3Iface.DownloadWithContext should have comment or be unexported (golint)
    • logs-to-elastic/internal/pkg/parsers/cloudwatch.go
    • Line 12: warning: comment on exported type CloudwatchLog should be of the form "CloudwatchLog ..." (with optional leading article) (golint)
    • Line 27: warning: exported method Cloudwatch.GetChunks should have comment or be unexported (golint)
    • Line 66: warning: comment on exported method Cloudwatch.GetChunk should be of the form "GetChunk ..." (golint)
    • logs-to-elastic/internal/pkg/handlers/common.go
    • Line 10: warning: comment on exported type Response should be of the form "Response ..." (with optional leading article) (golint)
    • Line 16: warning: exported function NewResponse should have comment or be unexported (golint)
    • Line 26: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • logs-to-elastic/internal/pkg/parsers/elb.go
    • Line 19: warning: exported var S3Client should have comment or be unexported (golint)
    • Line 21: warning: comment on exported type ElbLog should be of the form "ElbLog ..." (with optional leading article) (golint)
    • Line 44: warning: comment on exported type Elb should be of the form "Elb ..." (with optional leading article) (golint)
    • Line 51: warning: exported method Elb.GetChunks should have comment or be unexported (golint)
    • Line 69: warning: comment on exported method Elb.ParseRecord should be of the form "ParseRecord ..." (golint)
    • Line 125: warning: comment on exported method Elb.ParseRow should be of the form "ParseRow ..." (golint)
    • logs-to-elastic/internal/pkg/net/logstash.go
    • Line 1: warning: package comment should be of the form "Package net ..." (golint)
    • Line 25: warning: comment on exported function Client should be of the form "Client ..." (golint)
    • Line 31: warning: comment on exported function Post should be of the form "Post ..." (golint)
    • Line 49: warning: comment on exported function LogstashConsumer should be of the form "LogstashConsumer ..." (golint)
    • logs-to-elastic/internal/pkg/parsers/common.go
    • Line 9: warning: exported type EncodedChunk should have comment or be unexported (golint)
    • Line 14: warning: comment on exported function Chunk should be of the form "Chunk ..." (golint)
    • Line 26: warning: comment on exported function GetEncodedChunk should be of the form "GetEncodedChunk ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign23%

IneffAssign detects ineffectual assignments in Go code.

    • logs-to-elastic/internal/pkg/handlers/cloudwatch.go
    • Line 5: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 5: warning: could not import github.com/aws/aws-lambda-go/events (invalid package name: "") (ineffassign)
    • Line 6: warning: could not import github.com/jniedrauer/logs-to-elastic/internal/pkg/conf (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import github.com/jniedrauer/logs-to-elastic/internal/pkg/net (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/jniedrauer/logs-to-elastic/internal/pkg/parsers (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import github.com/sirupsen/logrus (invalid package name: "") (ineffassign)
    • Line 5: warning: could not import github.com/aws/aws-lambda-go/events (invalid package name: "") (ineffassign)
    • Line 6: warning: could not import github.com/jniedrauer/logs-to-elastic/internal/pkg/conf (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import github.com/jniedrauer/logs-to-elastic/internal/pkg/net (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/jniedrauer/logs-to-elastic/internal/pkg/parsers (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import github.com/sirupsen/logrus (invalid package name: "") (ineffassign)
    • logs-to-elastic/cmd/elb/main.go
    • Line 23: warning: cannot find package "." in: (ineffassign)
    • Line 24: warning: cannot find package "." in: (ineffassign)
    • Line 25: warning: cannot find package "." in: (ineffassign)
    • Line 23: warning: could not import github.com/aws/aws-lambda-go/lambda (invalid package name: "") (ineffassign)
    • Line 24: warning: could not import github.com/jniedrauer/logs-to-elastic/internal/pkg/handlers (invalid package name: "") (ineffassign)
    • Line 25: warning: could not import github.com/jniedrauer/logs-to-elastic/internal/pkg/logging (invalid package name: "") (ineffassign)
    • logs-to-elastic/internal/pkg/parsers/elb.go
    • Line 12: warning: cannot find package "." in: (ineffassign)
    • Line 13: warning: cannot find package "." in: (ineffassign)
    • Line 12: warning: could not import github.com/aws/aws-sdk-go/service/s3/s3manager (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import github.com/jniedrauer/logs-to-elastic/internal/pkg/awsapi (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import github.com/aws/aws-sdk-go/service/s3/s3manager (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import github.com/jniedrauer/logs-to-elastic/internal/pkg/awsapi (invalid package name: "") (ineffassign)
    • logs-to-elastic/internal/pkg/net/logstash.go
    • Line 11: warning: cannot find package "." in: (ineffassign)
    • Line 12: warning: cannot find package "." in: (ineffassign)
    • Line 13: warning: cannot find package "." in: (ineffassign)
    • Line 11: warning: could not import github.com/jniedrauer/logs-to-elastic/internal/pkg/conf (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import github.com/jniedrauer/logs-to-elastic/internal/pkg/parsers (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import github.com/sirupsen/logrus (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import github.com/jniedrauer/logs-to-elastic/internal/pkg/conf (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import github.com/jniedrauer/logs-to-elastic/internal/pkg/parsers (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import github.com/sirupsen/logrus (invalid package name: "") (ineffassign)
    • logs-to-elastic/cmd/cloudwatch/main.go
    • Line 26: warning: cannot find package "." in: (ineffassign)
    • Line 23: warning: cannot find package "." in: (ineffassign)
    • Line 24: warning: cannot find package "." in: (ineffassign)
    • Line 23: warning: could not import github.com/jniedrauer/logs-to-elastic/internal/pkg/handlers (invalid package name: "") (ineffassign)
    • Line 24: warning: could not import github.com/jniedrauer/logs-to-elastic/internal/pkg/logging (invalid package name: "") (ineffassign)
    • Line 26: warning: could not import github.com/aws/aws-lambda-go/lambda (invalid package name: "") (ineffassign)
    • logs-to-elastic/internal/pkg/awsapi/s3.go
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 10: warning: cannot find package "." in: (ineffassign)
    • Line 11: warning: cannot find package "." in: (ineffassign)
    • Line 12: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: could not import github.com/aws/aws-sdk-go/aws (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import github.com/aws/aws-sdk-go/service/s3 (invalid package name: "") (ineffassign)
    • Line 10: warning: could not import github.com/aws/aws-sdk-go/service/s3/s3manager (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import github.com/aws/aws-sdk-go/service/s3/s3manager/s3manageriface (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import github.com/sirupsen/logrus (invalid package name: "") (ineffassign)
    • Line 29: warning: c.Download undefined (type *S3Client has no field or method Download) (ineffassign)
    • Line 8: warning: could not import github.com/aws/aws-sdk-go/aws (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import github.com/aws/aws-sdk-go/service/s3 (invalid package name: "") (ineffassign)
    • Line 10: warning: could not import github.com/aws/aws-sdk-go/service/s3/s3manager (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import github.com/aws/aws-sdk-go/service/s3/s3manager/s3manageriface (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import github.com/sirupsen/logrus (invalid package name: "") (ineffassign)
    • Line 29: warning: c.Download undefined (type *S3Client has no field or method Download) (ineffassign)
    • logs-to-elastic/internal/pkg/awsapi/session.go
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: could not import github.com/aws/aws-sdk-go/aws/session (invalid package name: "") (ineffassign)
    • Line 6: warning: could not import github.com/aws/aws-sdk-go/aws/session (invalid package name: "") (ineffassign)
    • logs-to-elastic/internal/pkg/logging/init.go
    • Line 5: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 5: warning: could not import github.com/jniedrauer/logs-to-elastic/internal/pkg/conf (invalid package name: "") (ineffassign)
    • Line 6: warning: could not import github.com/sirupsen/logrus (invalid package name: "") (ineffassign)
    • Line 5: warning: could not import github.com/jniedrauer/logs-to-elastic/internal/pkg/conf (invalid package name: "") (ineffassign)
    • Line 6: warning: could not import github.com/sirupsen/logrus (invalid package name: "") (ineffassign)
    • logs-to-elastic/internal/pkg/parsers/cloudwatch.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import github.com/aws/aws-lambda-go/events (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/jniedrauer/logs-to-elastic/internal/pkg/conf (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import github.com/sirupsen/logrus (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import github.com/aws/aws-lambda-go/events (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/jniedrauer/logs-to-elastic/internal/pkg/conf (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import github.com/sirupsen/logrus (invalid package name: "") (ineffassign)

misspell95%

Misspell Finds commonly misspelled English words