Preparing report...

Report for github.com/pingcap/chaos-mesh

A+    Excellent!    Found 132 issues across 349 files

Tweet

gofmt98%

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!


gocyclo93%

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.

    • chaos-mesh/pkg/selector/selector.go
    • Line 88: warning: cyclomatic complexity 35 of function SelectPods() is high (> 15) (gocyclo)
    • Line 260: warning: cyclomatic complexity 20 of function CheckPodMeetSelector() is high (> 15) (gocyclo)
    • Line 355: warning: cyclomatic complexity 19 of function filterPodsByMode() is high (> 15) (gocyclo)

golint67%

Golint is a linter for Go source code.

    • chaos-mesh/api/v1alpha1/podchaos_types.go
    • Line 97: warning: exported method PodChaosSpec.GetSelector should have comment or be unexported (golint)
    • Line 101: warning: exported method PodChaosSpec.GetMode should have comment or be unexported (golint)
    • Line 105: warning: exported method PodChaosSpec.GetValue should have comment or be unexported (golint)
    • chaos-mesh/e2e-test/e2e/chaos/iochaos/io_delay.go
    • Line 22: warning: should not use dot imports (golint)
    • Line 35: warning: exported function TestcaseIODelayDurationForATimeThenRecover should have comment or be unexported (golint)
    • Line 104: warning: exported function TestcaseIODelayDurationForATimePauseAndUnPause should have comment or be unexported (golint)
    • Line 227: warning: exported function TestcaseIODelayWithSpecifiedContainer should have comment or be unexported (golint)
    • Line 295: warning: exported function TestcaseIODelayWithWrongSpec should have comment or be unexported (golint)
    • chaos-mesh/pkg/chaosdaemon/crclients/test/mockclient.go
    • Line 27: warning: exported type MockClient should have comment or be unexported (golint)
    • Line 29: warning: exported method MockClient.ContainerInspect should have comment or be unexported (golint)
    • Line 47: warning: exported method MockClient.ContainerKill should have comment or be unexported (golint)
    • Line 54: warning: exported method MockClient.LoadContainer should have comment or be unexported (golint)
    • Line 62: warning: exported type MockContainer should have comment or be unexported (golint)
    • Line 66: warning: exported method MockContainer.Task should have comment or be unexported (golint)
    • Line 74: warning: exported type MockTask should have comment or be unexported (golint)
    • Line 78: warning: exported method MockTask.Pid should have comment or be unexported (golint)
    • Line 86: warning: exported method MockTask.Kill should have comment or be unexported (golint)
    • chaos-mesh/pkg/bpm/buffer.go
    • Line 48: warning: exported function NewBlockingBuffer should have comment or be unexported (golint)
    • Line 57: warning: exported function NewConcurrentBuffer should have comment or be unexported (golint)
    • chaos-mesh/pkg/apiserver/utils/error.go
    • Line 27: warning: exported var ErrNS should have comment or be unexported (golint)
    • Line 36: warning: exported type APIError should have comment or be unexported (golint)
    • Line 76: warning: exported function SetErrorForGinCtx should have comment or be unexported (golint)
    • chaos-mesh/api/v1alpha1/podhttpchaos_types.go
    • Line 51: warning: exported type PodHttpChaosSelector should have comment or be unexported (golint)
    • Line 79: warning: comment on exported type PodHttpChaosActions should be of the form "PodHttpChaosActions ..." (with optional leading article) (golint)
    • Line 168: warning: exported const KindPodHttpChaos should have comment or be unexported (golint)
    • chaos-mesh/pkg/webhook/config/config.go
    • Line 96: warning: exported method Config.RequestAnnotationKey should have comment or be unexported (golint)
    • Line 100: warning: exported method Config.StatusAnnotationKey should have comment or be unexported (golint)
    • Line 104: warning: exported method Config.RequestInitAnnotationKey should have comment or be unexported (golint)
    • chaos-mesh/pkg/workflow/model/node/node.go
    • Line 16: warning: exported type NodePhase should have comment or be unexported (golint)
    • Line 19: warning: exported const Init should have comment (or a comment on this block) or be unexported (golint)
    • Line 22: warning: comment on exported const Holding should be of the form "Holding ..." (golint)
    • Line 31: warning: exported type Node should have comment or be unexported (golint)
    • Line 38: warning: comment on exported type NodeTreeNode should be of the form "NodeTreeNode ..." (with optional leading article) (golint)
    • Line 47: warning: exported type NodeTreeChildren should have comment or be unexported (golint)
    • chaos-mesh/pkg/chaosdaemon/server.go
    • Line 62: warning: comment on exported method Config.HttpAddr should be of the form "HttpAddr ..." (golint)
    • Line 67: warning: comment on exported method Config.GrpcAddr should be of the form "GrpcAddr ..." (golint)
    • chaos-mesh/pkg/workflow/errors/no_such_template.go
    • Line 16: warning: exported type NoSuchTemplateError should have comment or be unexported (golint)
    • Line 33: warning: exported function NewNoSuchTemplateError should have comment or be unexported (golint)
    • Line 42: warning: exported function NewNoSuchTemplateErrorInTemplates should have comment or be unexported (golint)
    • chaos-mesh/api/v1alpha1/iochaos_types.go
    • Line 113: warning: exported method IoChaosSpec.GetSelector should have comment or be unexported (golint)
    • Line 117: warning: exported method IoChaosSpec.GetMode should have comment or be unexported (golint)
    • Line 121: warning: exported method IoChaosSpec.GetValue should have comment or be unexported (golint)
    • chaos-mesh/pkg/testutils/generate.go
    • Line 36: warning: exported function NewPod should have comment or be unexported (golint)
    • Line 64: warning: exported function GenerateNPods should have comment or be unexported (golint)
    • Line 81: warning: exported function NewNode should have comment or be unexported (golint)
    • Line 97: warning: exported function GenerateNNodes should have comment or be unexported (golint)
    • chaos-mesh/api/v1alpha1/workflownode_types.go
    • Line 23: warning: exported const LabelControlledBy should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: comment on exported type WorkflowNode should be of the form "WorkflowNode ..." (with optional leading article) (golint)
    • Line 42: warning: exported type WorkflowNodeSpec should have comment or be unexported (golint)
    • Line 55: warning: exported type WorkflowNodeStatus should have comment or be unexported (golint)
    • Line 76: warning: exported type WorkflowNodeConditionType should have comment or be unexported (golint)
    • Line 79: warning: exported const ConditionAccomplished should have comment (or a comment on this block) or be unexported (golint)
    • Line 84: warning: exported type WorkflowNodeCondition should have comment or be unexported (golint)
    • Line 90: warning: comment on exported type WorkflowNodeList should be of the form "WorkflowNodeList ..." (with optional leading article) (golint)
    • chaos-mesh/e2e-test/e2e/chaos/iochaos/io_error.go
    • Line 34: warning: exported function TestcaseIOErrorDurationForATimeThenRecover should have comment or be unexported (golint)
    • Line 99: warning: exported function TestcaseIOErrorDurationForATimePauseAndUnPause should have comment or be unexported (golint)
    • Line 212: warning: exported function TestcaseIOErrorWithSpecifiedContainer should have comment or be unexported (golint)
    • chaos-mesh/api/v1alpha1/common_types.go
    • Line 157: warning: exported const ChaosPhaseNone should have comment (or a comment on this block) or be unexported (golint)
    • Line 162: warning: exported type ChaosStatus should have comment or be unexported (golint)
    • Line 171: warning: exported method ChaosStatus.GetNextStart should have comment or be unexported (golint)
    • Line 178: warning: exported method ChaosStatus.SetNextStart should have comment or be unexported (golint)
    • Line 190: warning: exported method ChaosStatus.GetNextRecover should have comment or be unexported (golint)
    • Line 197: warning: exported method ChaosStatus.SetNextRecover should have comment or be unexported (golint)
    • Line 224: warning: exported const ExperimentPhaseUninitialized should have comment (or a comment on this block) or be unexported (golint)
    • Line 232: warning: exported type ExperimentStatus should have comment or be unexported (golint)
    • chaos-mesh/pkg/bpm/bpm.go
    • Line 32: warning: exported type NsType should have comment or be unexported (golint)
    • Line 35: warning: exported const MountNS should have comment (or a comment on this block) or be unexported (golint)
    • Line 36: warning: comment on exported const IpcNS should be of the form "IpcNS ..." (golint)
    • Line 60: warning: exported const DefaultProcPrefix should have comment (or a comment on this block) or be unexported (golint)
    • Line 262: warning: exported method BackgroundProcessManager.Stdio should have comment or be unexported (golint)
    • Line 367: warning: exported method ProcessBuilder.EnableLocalMnt should have comment or be unexported (golint)
    • chaos-mesh/pkg/workflow/model/workflow/workflow.go
    • Line 21: warning: exported type WorkflowSpec should have comment or be unexported (golint)
    • Line 27: warning: exported type WorkflowPhase should have comment or be unexported (golint)
    • Line 30: warning: comment on exported const Init should be of the form "Init ..." (golint)
    • Line 32: warning: exported const Running should have comment (or a comment on this block) or be unexported (golint)
    • Line 37: warning: exported type WorkflowStatus should have comment or be unexported (golint)
    • chaos-mesh/api/v1alpha1/zz_generated.chaosmesh.go
    • Line 24: warning: exported const KindAwsChaos should have comment or be unexported (golint)
    • Line 51: warning: exported method AwsChaos.GetNextStart should have comment or be unexported (golint)
    • Line 58: warning: exported method AwsChaos.SetNextStart should have comment or be unexported (golint)
    • Line 70: warning: exported method AwsChaos.GetNextRecover should have comment or be unexported (golint)
    • Line 77: warning: exported method AwsChaos.SetNextRecover should have comment or be unexported (golint)
    • Line 156: warning: exported const KindDNSChaos should have comment or be unexported (golint)
    • Line 183: warning: exported method DNSChaos.GetNextStart should have comment or be unexported (golint)
    • Line 190: warning: exported method DNSChaos.SetNextStart should have comment or be unexported (golint)
    • Line 202: warning: exported method DNSChaos.GetNextRecover should have comment or be unexported (golint)
    • Line 209: warning: exported method DNSChaos.SetNextRecover should have comment or be unexported (golint)
    • Line 288: warning: exported const KindGcpChaos should have comment or be unexported (golint)
    • Line 315: warning: exported method GcpChaos.GetNextStart should have comment or be unexported (golint)
    • Line 322: warning: exported method GcpChaos.SetNextStart should have comment or be unexported (golint)
    • Line 334: warning: exported method GcpChaos.GetNextRecover should have comment or be unexported (golint)
    • Line 341: warning: exported method GcpChaos.SetNextRecover should have comment or be unexported (golint)
    • Line 420: warning: exported const KindHTTPChaos should have comment or be unexported (golint)
    • Line 447: warning: exported method HTTPChaos.GetNextStart should have comment or be unexported (golint)
    • Line 454: warning: exported method HTTPChaos.SetNextStart should have comment or be unexported (golint)
    • Line 466: warning: exported method HTTPChaos.GetNextRecover should have comment or be unexported (golint)
    • Line 473: warning: exported method HTTPChaos.SetNextRecover should have comment or be unexported (golint)
    • Line 552: warning: exported const KindIoChaos should have comment or be unexported (golint)
    • Line 579: warning: exported method IoChaos.GetNextStart should have comment or be unexported (golint)
    • Line 586: warning: exported method IoChaos.SetNextStart should have comment or be unexported (golint)
    • Line 598: warning: exported method IoChaos.GetNextRecover should have comment or be unexported (golint)
    • Line 605: warning: exported method IoChaos.SetNextRecover should have comment or be unexported (golint)
    • Line 684: warning: exported const KindJVMChaos should have comment or be unexported (golint)
    • Line 711: warning: exported method JVMChaos.GetNextStart should have comment or be unexported (golint)
    • Line 718: warning: exported method JVMChaos.SetNextStart should have comment or be unexported (golint)
    • Line 730: warning: exported method JVMChaos.GetNextRecover should have comment or be unexported (golint)
    • Line 737: warning: exported method JVMChaos.SetNextRecover should have comment or be unexported (golint)
    • Line 816: warning: exported const KindKernelChaos should have comment or be unexported (golint)
    • Line 843: warning: exported method KernelChaos.GetNextStart should have comment or be unexported (golint)
    • Line 850: warning: exported method KernelChaos.SetNextStart should have comment or be unexported (golint)
    • Line 862: warning: exported method KernelChaos.GetNextRecover should have comment or be unexported (golint)
    • Line 869: warning: exported method KernelChaos.SetNextRecover should have comment or be unexported (golint)
    • Line 948: warning: exported const KindNetworkChaos should have comment or be unexported (golint)
    • Line 975: warning: exported method NetworkChaos.GetNextStart should have comment or be unexported (golint)
    • Line 982: warning: exported method NetworkChaos.SetNextStart should have comment or be unexported (golint)
    • Line 994: warning: exported method NetworkChaos.GetNextRecover should have comment or be unexported (golint)
    • Line 1001: warning: exported method NetworkChaos.SetNextRecover should have comment or be unexported (golint)
    • Line 1080: warning: exported const KindPodChaos should have comment or be unexported (golint)
    • Line 1107: warning: exported method PodChaos.GetNextStart should have comment or be unexported (golint)
    • Line 1114: warning: exported method PodChaos.SetNextStart should have comment or be unexported (golint)
    • Line 1126: warning: exported method PodChaos.GetNextRecover should have comment or be unexported (golint)
    • Line 1133: warning: exported method PodChaos.SetNextRecover should have comment or be unexported (golint)
    • Line 1212: warning: exported const KindStressChaos should have comment or be unexported (golint)
    • Line 1239: warning: exported method StressChaos.GetNextStart should have comment or be unexported (golint)
    • Line 1246: warning: exported method StressChaos.SetNextStart should have comment or be unexported (golint)
    • Line 1258: warning: exported method StressChaos.GetNextRecover should have comment or be unexported (golint)
    • Line 1265: warning: exported method StressChaos.SetNextRecover should have comment or be unexported (golint)
    • Line 1344: warning: exported const KindTimeChaos should have comment or be unexported (golint)
    • Line 1371: warning: exported method TimeChaos.GetNextStart should have comment or be unexported (golint)
    • Line 1378: warning: exported method TimeChaos.SetNextStart should have comment or be unexported (golint)
    • Line 1390: warning: exported method TimeChaos.GetNextRecover should have comment or be unexported (golint)
    • Line 1397: warning: exported method TimeChaos.SetNextRecover should have comment or be unexported (golint)
    • chaos-mesh/api/v1alpha1/podiochaos_types.go
    • Line 156: warning: comment on exported const Zero should be of the form "Zero ..." (golint)
    • Line 173: warning: exported const NamedPipe should have comment (or a comment on this block) or be unexported (golint)
    • Line 182: warning: exported type IoMethod should have comment or be unexported (golint)
    • Line 185: warning: exported const LookUp should have comment (or a comment on this block) or be unexported (golint)
    • chaos-mesh/api/v1alpha1/zz_generated.workflow.chaosmesh.go
    • Line 25: warning: exported const TypeAwsChaos should have comment (or a comment on this block) or be unexported (golint)
    • Line 54: warning: exported type EmbedChaos should have comment or be unexported (golint)
    • Line 80: warning: exported method EmbedChaos.SpawnNewObject should have comment or be unexported (golint)
    • Line 135: warning: exported method EmbedChaos.SpawnNewList should have comment or be unexported (golint)
    • Line 179: warning: exported method AwsChaosList.GetItems should have comment or be unexported (golint)
    • Line 187: warning: exported method DNSChaosList.GetItems should have comment or be unexported (golint)
    • Line 195: warning: exported method GcpChaosList.GetItems should have comment or be unexported (golint)
    • Line 203: warning: exported method HTTPChaosList.GetItems should have comment or be unexported (golint)
    • Line 211: warning: exported method IoChaosList.GetItems should have comment or be unexported (golint)
    • Line 219: warning: exported method JVMChaosList.GetItems should have comment or be unexported (golint)
    • Line 227: warning: exported method KernelChaosList.GetItems should have comment or be unexported (golint)
    • Line 235: warning: exported method NetworkChaosList.GetItems should have comment or be unexported (golint)
    • Line 243: warning: exported method PodChaosList.GetItems should have comment or be unexported (golint)
    • Line 251: warning: exported method StressChaosList.GetItems should have comment or be unexported (golint)
    • Line 259: warning: exported method TimeChaosList.GetItems should have comment or be unexported (golint)
    • chaos-mesh/pkg/finalizer/utils.go
    • Line 16: warning: exported function RemoveFromFinalizer should have comment or be unexported (golint)
    • Line 27: warning: exported function InsertFinalizer should have comment or be unexported (golint)
    • chaos-mesh/controllers/recover/recover.go
    • Line 32: warning: exported type Delegate should have comment or be unexported (golint)
    • Line 38: warning: exported type RecoverIntf should have comment or be unexported (golint)
    • Line 42: warning: exported method Delegate.CleanFinalizersAndRecover should have comment or be unexported (golint)
    • chaos-mesh/pkg/workflow/controllers/chaos_node_reconciler.go
    • Line 33: warning: exported type ChaosNodeReconciler should have comment or be unexported (golint)
    • Line 39: warning: exported function NewChaosNodeReconciler should have comment or be unexported (golint)
    • Line 43: warning: exported method ChaosNodeReconciler.Reconcile should have comment or be unexported (golint)
    • Line 237: warning: exported type SortGenericChaosByCreationTimestamp should have comment or be unexported (golint)
    • chaos-mesh/e2e-test/e2e/chaos/timechaos/time_skew.go
    • Line 22: warning: should not use dot imports (golint)
    • Line 34: warning: exported function TestcaseTimeSkewOnceThenRecover should have comment or be unexported (golint)
    • Line 104: warning: exported function TestcaseTimeSkewPauseThenUnpause should have comment or be unexported (golint)
    • Line 220: warning: exported function TestcaseTimeSkewStartAtWaitingThenIntoRunning should have comment or be unexported (golint)
    • chaos-mesh/pkg/chaosctl/common/logger.go
    • Line 25: warning: exported type LoggerFlushFunc should have comment or be unexported (golint)
    • Line 27: warning: exported function SetupKlog should have comment or be unexported (golint)
    • Line 34: warning: exported function NewStderrLogger should have comment or be unexported (golint)
    • Line 41: warning: exported function SetupGlobalLogger should have comment or be unexported (golint)
    • Line 45: warning: exported function L should have comment or be unexported (golint)
    • chaos-mesh/pkg/chaosctl/common/common.go
    • Line 49: warning: exported type Color should have comment or be unexported (golint)
    • Line 52: warning: exported const Blue should have comment (or a comment on this block) or be unexported (golint)
    • Line 75: warning: exported type ChaosResult should have comment or be unexported (golint)
    • Line 80: warning: exported type PodResult should have comment or be unexported (golint)
    • Line 86: warning: exported const ItemSuccess should have comment (or a comment on this block) or be unexported (golint)
    • Line 90: warning: exported const ChaosDaemonClientCert should have comment or be unexported (golint)
    • Line 91: warning: exported const ChaosDaemonNamespace should have comment or be unexported (golint)
    • Line 93: warning: exported var TLSFiles should have comment or be unexported (golint)
    • Line 94: warning: exported var Insecure should have comment or be unexported (golint)
    • Line 96: warning: exported type ItemResult should have comment or be unexported (golint)
    • chaos-mesh/pkg/grpc/utils.go
    • Line 37: warning: exported const ChaosDaemonServerName should have comment or be unexported (golint)
    • Line 39: warning: exported type TLSRaw should have comment or be unexported (golint)
    • Line 45: warning: exported type TLSFile should have comment or be unexported (golint)
    • Line 51: warning: exported type FileProvider should have comment or be unexported (golint)
    • Line 55: warning: exported type RawProvider should have comment or be unexported (golint)
    • Line 59: warning: exported type InsecureProvider should have comment or be unexported (golint)
    • Line 62: warning: exported type CredentialProvider should have comment or be unexported (golint)
    • Line 108: warning: exported type GrpcBuilder should have comment or be unexported (golint)
    • Line 115: warning: exported function Builder should have comment or be unexported (golint)
    • Line 119: warning: exported method GrpcBuilder.WithDefaultTimeout should have comment or be unexported (golint)
    • Line 124: warning: exported method GrpcBuilder.WithTimeout should have comment or be unexported (golint)
    • Line 129: warning: exported method GrpcBuilder.Insecure should have comment or be unexported (golint)
    • Line 134: warning: exported method GrpcBuilder.TLSFromRaw should have comment or be unexported (golint)
    • Line 146: warning: exported method GrpcBuilder.TLSFromFile should have comment or be unexported (golint)
    • Line 157: warning: exported method GrpcBuilder.Build should have comment or be unexported (golint)
    • chaos-mesh/controllers/test/types.go
    • Line 45: warning: exported method MockChaosDaemonClient.ContainerGetPid should have comment or be unexported (golint)
    • Line 59: warning: exported method MockChaosDaemonClient.FlushIPSets should have comment or be unexported (golint)
    • Line 63: warning: exported method MockChaosDaemonClient.SetIptablesChains should have comment or be unexported (golint)
    • Line 67: warning: exported method MockChaosDaemonClient.SetTimeOffset should have comment or be unexported (golint)
    • Line 71: warning: exported method MockChaosDaemonClient.RecoverTimeOffset should have comment or be unexported (golint)
    • Line 75: warning: exported method MockChaosDaemonClient.ContainerKill should have comment or be unexported (golint)
    • Line 79: warning: exported method MockChaosDaemonClient.ApplyIoChaos should have comment or be unexported (golint)
    • Line 83: warning: exported method MockChaosDaemonClient.ApplyHttpChaos should have comment or be unexported (golint)
    • Line 87: warning: exported method MockChaosDaemonClient.SetDNSServer should have comment or be unexported (golint)
    • Line 91: warning: exported method MockChaosDaemonClient.SetTcs should have comment or be unexported (golint)
    • Line 95: warning: exported method MockChaosDaemonClient.Close should have comment or be unexported (golint)
    • chaos-mesh/pkg/clientpool/client.go
    • Line 34: warning: exported type Clients should have comment or be unexported (golint)
    • Line 41: warning: exported type LocalClient should have comment or be unexported (golint)
    • Line 46: warning: exported function NewLocalClient should have comment or be unexported (golint)
    • Line 70: warning: exported method LocalClient.AuthClient should have comment or be unexported (golint)
    • Line 84: warning: comment on exported type ClientsPool should be of the form "ClientsPool ..." (with optional leading article) (golint)
    • Line 94: warning: comment on exported function NewClientPool should be of the form "NewClientPool ..." (golint)
    • Line 150: warning: exported method ClientsPool.AuthClient should have comment or be unexported (golint)
    • chaos-mesh/pkg/core/workflow.go
    • Line 31: warning: exported type WorkflowRepository should have comment or be unexported (golint)
    • Line 40: warning: exported type WorkflowStatus should have comment or be unexported (golint)
    • Line 43: warning: exported const WorkflowRunning should have comment (or a comment on this block) or be unexported (golint)
    • Line 60: warning: exported type WorkflowDetail should have comment or be unexported (golint)
    • Line 71: warning: exported type NodeState should have comment or be unexported (golint)
    • Line 74: warning: exported const NodeRunning should have comment (or a comment on this block) or be unexported (golint)
    • Line 89: warning: exported type NodeNameWithTemplate should have comment or be unexported (golint)
    • Line 136: warning: exported type KubeWorkflowRepository should have comment or be unexported (golint)
    • Line 140: warning: exported function NewKubeWorkflowRepository should have comment or be unexported (golint)
    • Line 144: warning: exported method KubeWorkflowRepository.Create should have comment or be unexported (golint)
    • Line 153: warning: exported method KubeWorkflowRepository.Update should have comment or be unexported (golint)
    • Line 173: warning: exported method KubeWorkflowRepository.ListByNamespace should have comment or be unexported (golint)
    • Line 191: warning: exported method KubeWorkflowRepository.List should have comment or be unexported (golint)
    • Line 195: warning: exported method KubeWorkflowRepository.Get should have comment or be unexported (golint)
    • Line 228: warning: exported method KubeWorkflowRepository.Delete should have comment or be unexported (golint)
    • chaos-mesh/pkg/apiserver/workflow/workflow.go
    • Line 34: warning: exported function Register should have comment or be unexported (golint)
    • Line 48: warning: exported function NewService should have comment or be unexported (golint)
    • Line 54: warning: exported function NewServiceWithKubeRepo should have comment or be unexported (golint)
    • chaos-mesh/api/v1alpha1/httpchaos_types.go
    • Line 34: warning: exported const HTTPDelayAction should have comment (or a comment on this block) or be unexported (golint)
    • Line 39: warning: exported type Matcher should have comment or be unexported (golint)
    • Line 51: warning: exported type HTTPChaosSpec should have comment or be unexported (golint)
    • Line 95: warning: exported method HTTPChaosSpec.GetHeaders should have comment or be unexported (golint)
    • Line 99: warning: exported method HTTPChaosSpec.GetMode should have comment or be unexported (golint)
    • Line 103: warning: exported method HTTPChaosSpec.GetValue should have comment or be unexported (golint)
    • Line 107: warning: exported method HTTPChaosSpec.GetSelector should have comment or be unexported (golint)
    • Line 111: warning: exported type HTTPChaosStatus should have comment or be unexported (golint)
    • chaos-mesh/e2e-test/e2e/chaos/iochaos/io_mistake.go
    • Line 33: warning: exported function TestcaseIOMistakeDurationForATimeThenRecover should have comment or be unexported (golint)
    • Line 104: warning: exported function TestcaseIOMistakeDurationForATimePauseAndUnPause should have comment or be unexported (golint)
    • Line 226: warning: exported function TestcaseIOMistakeWithSpecifiedContainer should have comment or be unexported (golint)
    • chaos-mesh/pkg/workflow/model/template/template.go
    • Line 16: warning: exported type TemplateType should have comment or be unexported (golint)
    • Line 19: warning: exported const Task should have comment (or a comment on this block) or be unexported (golint)
    • Line 34: warning: exported type Template should have comment or be unexported (golint)
    • Line 39: warning: comment on exported method TemplateType.IsCompositeType should be of the form "IsCompositeType ..." (golint)
    • chaos-mesh/pkg/workflow/controllers/utils.go
    • Line 29: warning: exported function SetCondition should have comment or be unexported (golint)
    • Line 38: warning: exported function GetCondition should have comment or be unexported (golint)
    • Line 47: warning: exported function ConditionEqualsTo should have comment or be unexported (golint)
    • Line 66: warning: exported function WorkflowNodeFinished should have comment or be unexported (golint)
    • Line 71: warning: exported function SetWorkflowCondition should have comment or be unexported (golint)
    • Line 80: warning: exported function GetWorkflowCondition should have comment or be unexported (golint)
    • Line 89: warning: exported function WorkflowConditionEqualsTo should have comment or be unexported (golint)
    • Line 108: warning: exported type SortByCreationTimestamp should have comment or be unexported (golint)
    • Line 122: warning: exported type ChildNodesFetcher should have comment or be unexported (golint)
    • Line 127: warning: exported function NewChildNodesFetcher should have comment or be unexported (golint)
    • chaos-mesh/e2e-test/e2e/util/util.go
    • Line 123: warning: exported function PauseChaos should have comment or be unexported (golint)
    • Line 133: warning: exported function UnPauseChaos should have comment or be unexported (golint)
    • Line 143: warning: exported function WaitE2EHelperReady should have comment or be unexported (golint)
    • chaos-mesh/api/v1alpha1/workflow_types.go
    • Line 25: warning: comment on exported type Workflow should be of the form "Workflow ..." (with optional leading article) (golint)
    • Line 40: warning: exported type WorkflowSpec should have comment or be unexported (golint)
    • Line 45: warning: exported type WorkflowStatus should have comment or be unexported (golint)
    • Line 59: warning: exported type WorkflowConditionType should have comment or be unexported (golint)
    • Line 62: warning: exported const WorkflowConditionAccomplished should have comment (or a comment on this block) or be unexported (golint)
    • Line 66: warning: exported type WorkflowCondition should have comment or be unexported (golint)
    • Line 73: warning: exported type TemplateType should have comment or be unexported (golint)
    • Line 76: warning: exported const TypeTask should have comment (or a comment on this block) or be unexported (golint)
    • Line 82: warning: exported function IsChaosTemplateType should have comment or be unexported (golint)
    • Line 95: warning: exported type Template should have comment or be unexported (golint)
    • Line 104: warning: comment on exported type WorkflowList should be of the form "WorkflowList ..." (with optional leading article) (golint)
    • Line 115: warning: exported function FetchChaosByTemplateType 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!


misspell99%

Misspell Finds commonly misspelled English words

    • chaos-mesh/pkg/bpm/buffer_test.go
    • Line 51: warning: "seperator" is a misspelling of "separator" (misspell)
    • Line 62: warning: "seperator" is a misspelling of "separator" (misspell)
    • Line 76: warning: "seperator" is a misspelling of "separator" (misspell)
    • Line 128: warning: "seperator" is a misspelling of "separator" (misspell)
    • Line 130: warning: "seperator" is a misspelling of "separator" (misspell)