Gofmt formats Go programs. We run gofmt -s
on your code, where -s
is for the "simplify" command
No problems detected. Good job!
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!
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!
Golint is a linter for Go source code.
-
monitoring-agent-api/agents/prometheus/lib.go
- Line 29: warning: exported function New should have comment or be unexported (golint)
- Line 33: warning: exported method Prometheus.GetType should have comment or be unexported (golint)
- Line 37: warning: exported method Prometheus.CreateOrUpdate should have comment or be unexported (golint)
- Line 41: warning: exported method Prometheus.Delete should have comment or be unexported (golint)
-
monitoring-agent-api/api/v1/types.go
- Line 27: warning: exported type AgentType should have comment or be unexported (golint)
- Line 30: warning: exported const KeyAgent should have comment (or a comment on this block) or be unexported (golint)
- Line 43: warning: exported method AgentType.Vendor should have comment or be unexported (golint)
- Line 47: warning: exported type AgentSpec should have comment or be unexported (golint)
- Line 52: warning: exported type PrometheusSpec should have comment or be unexported (golint)
- Line 57: warning: exported type ServiceMonitorSpec should have comment or be unexported (golint)
- Line 67: warning: exported type PrometheusExporterSpec should have comment or be unexported (golint)
- Line 104: warning: exported type Agent should have comment or be unexported (golint)
- Line 110: warning: exported type StatsAccessor should have comment or be unexported (golint)
-
monitoring-agent-api/prometheus/v1/servicemonitor.go
- Line 38: warning: exported function CreateOrPatchServiceMonitor should have comment or be unexported (golint)
- Line 59: warning: exported function PatchServiceMonitor should have comment or be unexported (golint)
- Line 63: warning: exported function PatchServiceMonitorObject should have comment or be unexported (golint)
- Line 86: warning: exported function TryUpdateMonitorObject should have comment or be unexported (golint)
-
monitoring-agent-api/agents/prometheusoperator/lib.go
- Line 43: warning: exported function New should have comment or be unexported (golint)
- Line 51: warning: exported method PrometheusOperator.GetType should have comment or be unexported (golint)
- Line 55: warning: exported method PrometheusOperator.CreateOrUpdate should have comment or be unexported (golint)
- Line 104: warning: exported method PrometheusOperator.Delete should have comment or be unexported (golint)
-
monitoring-agent-api/agents/prometheusbuiltin/lib.go
- Line 39: warning: exported function New should have comment or be unexported (golint)
- Line 43: warning: exported method PrometheusBuiltin.GetType should have comment or be unexported (golint)
- Line 47: warning: exported method PrometheusBuiltin.CreateOrUpdate should have comment or be unexported (golint)
- Line 73: warning: exported method PrometheusBuiltin.Delete should have comment or be unexported (golint)
-
monitoring-agent-api/prometheus/v1/kubernetes.go
- Line 32: warning: exported var SchemeGroupVersion should have comment or be unexported (golint)
- Line 34: warning: exported function GetGroupVersionKind should have comment or be unexported (golint)
- Line 38: warning: exported function AssignTypeKind should have comment or be unexported (golint)
- Line 80: warning: exported function AddToScheme should have comment or be unexported (golint)
Checks whether your project has a LICENSE file.
No problems detected. Good job!
IneffAssign detects ineffectual assignments in Go code.
No problems detected. Good job!
Misspell Finds commonly misspelled English words
No problems detected. Good job!