Preparing report...

Report for github.com/m-mizutani/octovy

A+    Excellent!    Found 44 issues across 85 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!


gocyclo96%

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.

    • octovy/backend/pkg/usecase/github.go
    • Line 129: warning: cyclomatic complexity 28 of function (*Default).HandleGitHubPullReqEvent() is high (> 15) (gocyclo)
    • Line 53: warning: cyclomatic complexity 17 of function (*Default).HandleGitHubPushEvent() is high (> 15) (gocyclo)

golint49%

Golint is a linter for Go source code.

    • octovy/backend/pkg/domain/model/errors.go
    • Line 6: warning: comment on exported var ErrInvalidInputValues should be of the form "ErrInvalidInputValues ..." (golint)
    • Line 9: warning: comment on exported var ErrInvalidSecretValues should be of the form "ErrInvalidSecretValues ..." (golint)
    • Line 12: warning: comment on exported var ErrSystem should be of the form "ErrSystem ..." (golint)
    • Line 15: warning: comment on exported var ErrInvalidWebhookData should be of the form "ErrInvalidWebhookData ..." (golint)
    • octovy/backend/pkg/domain/model/trivy.go
    • Line 9: warning: exported type AdvisoryData should have comment or be unexported (golint)
    • Line 14: warning: exported method AdvisoryData.Unmarshal should have comment or be unexported (golint)
    • Line 21: warning: exported type TrivyDBMeta should have comment or be unexported (golint)
    • octovy/backend/pkg/infra/db/branch.go
    • Line 27: warning: exported method DynamoClient.UpdateBranch should have comment or be unexported (golint)
    • Line 46: warning: exported method DynamoClient.LookupBranch should have comment or be unexported (golint)
    • Line 66: warning: exported method DynamoClient.FindLatestScannedBranch should have comment or be unexported (golint)
    • octovy/backend/pkg/infra/db/package.go
    • Line 23: warning: exported method DynamoClient.InsertPackageRecord should have comment or be unexported (golint)
    • Line 43: warning: exported method DynamoClient.RemovePackageRecord should have comment or be unexported (golint)
    • Line 62: warning: exported method DynamoClient.UpdatePackageRecord should have comment or be unexported (golint)
    • Line 82: warning: exported method DynamoClient.FindPackageRecordsByName should have comment or be unexported (golint)
    • Line 100: warning: exported method DynamoClient.FindPackageRecordsByBranch should have comment or be unexported (golint)
    • octovy/backend/pkg/infra/db/repo.go
    • Line 23: warning: exported method DynamoClient.InsertRepo should have comment or be unexported (golint)
    • Line 49: warning: exported method DynamoClient.SetRepoBranches should have comment or be unexported (golint)
    • Line 61: warning: exported method DynamoClient.UpdateBranchIfDefault should have comment or be unexported (golint)
    • Line 77: warning: exported method DynamoClient.SetRepoDefaultBranchName should have comment or be unexported (golint)
    • Line 99: warning: exported method DynamoClient.FindRepo should have comment or be unexported (golint)
    • Line 111: warning: exported method DynamoClient.FindRepoByOwner should have comment or be unexported (golint)
    • Line 124: warning: exported method DynamoClient.FindRepoByFullName should have comment or be unexported (golint)
    • Line 142: warning: exported method DynamoClient.FindOwners should have comment or be unexported (golint)
    • octovy/backend/pkg/domain/model/config.go
    • Line 9: warning: exported type Config should have comment or be unexported (golint)
    • Line 30: warning: exported function NewConfig should have comment or be unexported (golint)
    • Line 43: warning: exported method Config.ShouldCommentPR should have comment or be unexported (golint)
    • Line 52: warning: exported method Config.ShouldFailIfVuln should have comment or be unexported (golint)
    • octovy/backend/pkg/domain/model/scan.go
    • Line 7: warning: exported type ScanRepositoryRequest should have comment or be unexported (golint)
    • Line 13: warning: exported type FeedbackOptions should have comment or be unexported (golint)
    • Line 19: warning: exported method ScanRepositoryRequest.IsValid should have comment or be unexported (golint)
    • Line 30: warning: exported type FeedbackRequest should have comment or be unexported (golint)
    • Line 36: warning: exported method FeedbackRequest.IsValid should have comment or be unexported (golint)
    • Line 50: warning: exported type ScanTarget should have comment or be unexported (golint)
    • Line 60: warning: comment on exported function Int64 should be of the form "Int64 ..." (golint)
    • Line 62: warning: exported function Int should have comment or be unexported (golint)
    • Line 64: warning: exported method ScanTarget.IsValid should have comment or be unexported (golint)
    • Line 81: warning: exported type ScanLog should have comment or be unexported (golint)
    • Line 87: warning: exported type ScanReportSummary should have comment or be unexported (golint)
    • Line 95: warning: exported type ScanReport should have comment or be unexported (golint)
    • Line 109: warning: exported method ScanReport.IsValid should have comment or be unexported (golint)
    • Line 123: warning: exported method ScanReport.ToLog should have comment or be unexported (golint)
    • octovy/backend/pkg/infra/aws/s3.go
    • Line 14: warning: exported function NewS3 should have comment or be unexported (golint)
    • Line 25: warning: exported type MockS3 should have comment or be unexported (golint)
    • Line 31: warning: exported method MockS3.GetObject should have comment or be unexported (golint)
    • Line 48: warning: exported method MockS3.PutObject should have comment or be unexported (golint)
    • Line 63: warning: exported function NewMockS3 should have comment or be unexported (golint)
    • octovy/backend/pkg/usecase/scan.go
    • Line 208: warning: exported method Default.ScanRepository should have comment or be unexported (golint)
    • Line 376: warning: exported method Default.LookupScanReport should have comment or be unexported (golint)
    • Line 400: warning: exported method Default.FindPackageRecordsByBranch should have comment or be unexported (golint)
    • Line 404: warning: exported method Default.FindPackageRecordsByName should have comment or be unexported (golint)
    • octovy/backend/pkg/domain/model/package.go
    • Line 5: warning: exported type PkgType should have comment or be unexported (golint)
    • Line 8: warning: exported const PkgRubyGems should have comment (or a comment on this block) or be unexported (golint)
    • Line 14: warning: exported type PackageRecord should have comment or be unexported (golint)
    • Line 23: warning: exported type Package should have comment or be unexported (golint)
    • Line 30: warning: exported type PackageSource should have comment or be unexported (golint)
    • Line 35: warning: exported type Vulnerability should have comment or be unexported (golint)
    • octovy/backend/pkg/infra/aws/sqs.go
    • Line 12: warning: exported function NewSQS should have comment or be unexported (golint)
    • Line 23: warning: exported type MockSQS should have comment or be unexported (golint)
    • Line 28: warning: exported method MockSQS.SendMessage should have comment or be unexported (golint)
    • Line 35: warning: exported function NewMockSQSSet should have comment or be unexported (golint)
    • octovy/backend/pkg/controller/lambda.go
    • Line 13: warning: exported method Controller.LambdaAPIHandler should have comment or be unexported (golint)
    • Line 30: warning: exported method Controller.LambdaScanRepo should have comment or be unexported (golint)
    • Line 52: warning: exported method Controller.LambdaUpdateDB should have comment or be unexported (golint)
    • Line 59: warning: exported method Controller.LambdaFeedback should have comment or be unexported (golint)
    • octovy/backend/pkg/infra/githubapp/app.go
    • Line 20: warning: exported type GitHubApp should have comment or be unexported (golint)
    • Line 29: warning: exported function New should have comment or be unexported (golint)
    • Line 66: warning: exported method GitHubApp.GetCodeZip should have comment or be unexported (golint)
    • Line 120: warning: exported method GitHubApp.CreateIssueComment should have comment or be unexported (golint)
    • Line 141: warning: exported method GitHubApp.CreateCheckRun should have comment or be unexported (golint)
    • Line 165: warning: exported method GitHubApp.UpdateCheckRun should have comment or be unexported (golint)
    • octovy/backend/pkg/infra/trivydb/db.go
    • Line 15: warning: exported type TrivyDB should have comment or be unexported (golint)
    • Line 24: warning: exported function New should have comment or be unexported (golint)
    • Line 37: warning: exported method TrivyDB.GetAdvisories should have comment or be unexported (golint)
    • Line 71: warning: exported method TrivyDB.GetVulnerability should have comment or be unexported (golint)
    • Line 105: warning: exported method TrivyDB.GetDBMeta should have comment or be unexported (golint)
    • Line 149: warning: exported type TrivyDBMock should have comment or be unexported (golint)
    • Line 156: warning: exported function NewMock should have comment or be unexported (golint)
    • Line 176: warning: exported method TrivyDBMock.GetAdvisories should have comment or be unexported (golint)
    • Line 185: warning: exported method TrivyDBMock.GetVulnerability should have comment or be unexported (golint)
    • Line 189: warning: exported method TrivyDBMock.GetDBMeta should have comment or be unexported (golint)
    • Line 192: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • octovy/backend/pkg/infra/githubapp/mock.go
    • Line 11: warning: exported type Mock should have comment or be unexported (golint)
    • Line 23: warning: exported function NewMock should have comment or be unexported (golint)
    • Line 35: warning: exported method Mock.GetCodeZip should have comment or be unexported (golint)
    • Line 38: warning: exported method Mock.CreateIssueComment should have comment or be unexported (golint)
    • Line 41: warning: exported method Mock.CreateCheckRun should have comment or be unexported (golint)
    • Line 44: warning: exported method Mock.UpdateCheckRun should have comment or be unexported (golint)
    • octovy/backend/pkg/usecase/github.go
    • Line 12: warning: exported method Default.HandleGitHubInstallationEvent should have comment or be unexported (golint)
    • Line 53: warning: exported method Default.HandleGitHubPushEvent should have comment or be unexported (golint)
    • Line 129: warning: exported method Default.HandleGitHubPullReqEvent should have comment or be unexported (golint)
    • octovy/backend/pkg/infra/github/github.go
    • Line 15: warning: exported type Client should have comment or be unexported (golint)
    • Line 19: warning: exported function New should have comment or be unexported (golint)
    • Line 25: warning: exported method Client.ListReleases should have comment or be unexported (golint)
    • Line 40: warning: exported method Client.DownloadReleaseAsset should have comment or be unexported (golint)
    • octovy/backend/pkg/service/service.go
    • Line 12: warning: exported type Service should have comment or be unexported (golint)
    • Line 20: warning: exported function New should have comment or be unexported (golint)
    • Line 27: warning: exported method Service.DB should have comment or be unexported (golint)
    • octovy/backend/pkg/infra/db/vulnerability.go
    • Line 27: warning: exported method DynamoClient.InsertVulnerability should have comment or be unexported (golint)
    • Line 60: warning: exported method DynamoClient.FindVulnerability should have comment or be unexported (golint)
    • Line 79: warning: exported method DynamoClient.FindLatestVulnerabilities should have comment or be unexported (golint)
    • Line 100: warning: exported method DynamoClient.GetVulnerabilities should have comment or be unexported (golint)
    • octovy/backend/pkg/domain/model/repository.go
    • Line 5: warning: exported type GitHubRepo should have comment or be unexported (golint)
    • Line 10: warning: exported method GitHubRepo.IsValid should have comment or be unexported (golint)
    • Line 21: warning: exported type GitHubBranch should have comment or be unexported (golint)
    • Line 26: warning: exported method GitHubBranch.IsValid should have comment or be unexported (golint)
    • Line 37: warning: exported type GitHubCommit should have comment or be unexported (golint)
    • Line 42: warning: exported type Owner should have comment or be unexported (golint)
    • Line 46: warning: exported type Repository should have comment or be unexported (golint)
    • Line 54: warning: exported type Branch should have comment or be unexported (golint)
    • octovy/backend/pkg/usecase/repository.go
    • Line 7: warning: exported method Default.RegisterRepository should have comment or be unexported (golint)
    • Line 21: warning: exported method Default.PutNewRepository should have comment or be unexported (golint)
    • Line 25: warning: exported method Default.UpdateRepositoryDefaultBranch should have comment or be unexported (golint)
    • Line 29: warning: exported method Default.FindOwners should have comment or be unexported (golint)
    • Line 33: warning: exported method Default.FindRepos should have comment or be unexported (golint)
    • Line 37: warning: exported method Default.FindReposByOwner should have comment or be unexported (golint)
    • Line 41: warning: exported method Default.FindReposByFullName should have comment or be unexported (golint)
    • Line 55: warning: exported method Default.LookupBranch should have comment or be unexported (golint)
    • Line 59: warning: exported method Default.FindPkgs should have comment or be unexported (golint)
    • Line 63: warning: exported method Default.FindPkgsByRepo should have comment or be unexported (golint)
    • octovy/backend/pkg/service/detector/detector.go
    • Line 12: warning: exported type Detector should have comment or be unexported (golint)
    • Line 16: warning: exported function New should have comment or be unexported (golint)
    • Line 49: warning: exported method Detector.Detect should have comment or be unexported (golint)
    • Line 88: warning: exported method Detector.TrivyDBMeta should have comment or be unexported (golint)
    • octovy/backend/pkg/infra/aws/secrets_manager.go
    • Line 13: warning: exported function NewSecretsManager should have comment or be unexported (golint)
    • Line 24: warning: exported type MockSecretsManager should have comment or be unexported (golint)
    • Line 29: warning: exported method MockSecretsManager.GetSecretValue should have comment or be unexported (golint)
    • Line 45: warning: exported function NewMockSecretsManagerSet should have comment or be unexported (golint)
    • octovy/backend/pkg/domain/interfaces/infra.go
    • Line 17: warning: exported type Infra should have comment or be unexported (golint)
    • Line 29: warning: comment on exported type NewSecretManager should be of the form "NewSecretManager ..." (with optional leading article) (golint)
    • Line 32: warning: exported type SecretsManagerClient should have comment or be unexported (golint)
    • Line 36: warning: comment on exported type NewSQS should be of the form "NewSQS ..." (with optional leading article) (golint)
    • Line 38: warning: exported type SQSClient should have comment or be unexported (golint)
    • Line 42: warning: comment on exported type NewS3 should be of the form "NewS3 ..." (with optional leading article) (golint)
    • Line 44: warning: exported type S3Client should have comment or be unexported (golint)
    • Line 49: warning: comment on exported type NewDB should be of the form "NewDB ..." (with optional leading article) (golint)
    • Line 51: warning: exported type DBClient should have comment or be unexported (golint)
    • Line 84: warning: comment on exported type NewGitHub should be of the form "NewGitHub ..." (with optional leading article) (golint)
    • Line 86: warning: exported type GitHubClient should have comment or be unexported (golint)
    • Line 91: warning: comment on exported type NewGitHubApp should be of the form "NewGitHubApp ..." (with optional leading article) (golint)
    • Line 93: warning: exported type GitHubApp should have comment or be unexported (golint)
    • Line 100: warning: comment on exported type NewTrivyDB should be of the form "NewTrivyDB ..." (with optional leading article) (golint)
    • Line 102: warning: exported type TrivyDBClient should have comment or be unexported (golint)
    • Line 108: warning: comment on exported type TimeNow should be of the form "TimeNow ..." (with optional leading article) (golint)
    • Line 110: warning: exported type WriteFile should have comment or be unexported (golint)
    • Line 111: warning: exported type OpenZip should have comment or be unexported (golint)
    • Line 112: warning: exported type TempFile should have comment or be unexported (golint)
    • Line 113: warning: exported type Remove should have comment or be unexported (golint)
    • Line 115: warning: exported type Utils should have comment or be unexported (golint)
    • octovy/backend/pkg/service/sqs.go
    • Line 37: warning: exported method Service.SendScanRequest should have comment or be unexported (golint)
    • Line 48: warning: exported method Service.SendFeedbackRequest should have comment or be unexported (golint)
    • octovy/backend/pkg/infra/db/scan.go
    • Line 38: warning: exported method DynamoClient.InsertScanReport should have comment or be unexported (golint)
    • Line 69: warning: exported method DynamoClient.LookupScanReport should have comment or be unexported (golint)
    • Line 89: warning: exported method DynamoClient.FindScanLogsByBranch should have comment or be unexported (golint)
    • Line 105: warning: exported method DynamoClient.FindScanLogsByCommit 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