Preparing report...

Report for github.com/astarte-platform/astarte-kubernetes-operator

A+    Excellent!    Found 24 issues across 70 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!


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.


golint67%

Golint is a linter for Go source code.

    • astarte-kubernetes-operator/external/voyager/v1beta1/certificate.go
    • Line 1: warning: package comment should be of the form "Package v1beta1 ..." (golint)
    • Line 24: warning: exported const ResourceKindCertificate should have comment (or a comment on this block) or be unexported (golint)
    • Line 36: warning: comment on exported type Certificate should be of the form "Certificate ..." (with optional leading article) (golint)
    • Line 48: warning: exported type CertificateSpec should have comment or be unexported (golint)
    • Line 78: warning: exported type ChallengeProvider should have comment or be unexported (golint)
    • Line 83: warning: exported type HTTPChallengeProvider should have comment or be unexported (golint)
    • Line 87: warning: exported type DNSChallengeProvider should have comment or be unexported (golint)
    • Line 93: warning: exported type CertificateStorage should have comment or be unexported (golint)
    • Line 98: warning: exported type VaultStore should have comment or be unexported (golint)
    • Line 103: warning: exported type CertificateStatus should have comment or be unexported (golint)
    • Line 114: warning: exported type ACMECertificateDetails should have comment or be unexported (golint)
    • Line 121: warning: exported type CertificateDetails should have comment or be unexported (golint)
    • Line 130: warning: exported type RequestConditionType should have comment or be unexported (golint)
    • Line 139: warning: exported type CertificateCondition should have comment or be unexported (golint)
    • Line 155: warning: exported type CertificateList should have comment or be unexported (golint)
    • astarte-kubernetes-operator/external/voyager/v1beta1/annotations.go
    • Line 26: warning: exported const EngressKey should have comment (or a comment on this block) or be unexported (golint)
    • Line 34: warning: comment on exported const StatsOn should be of the form "StatsOn ..." (golint)
    • Line 50: warning: comment on exported const LoadBalancerIP should be of the form "LoadBalancerIP ..." (golint)
    • Line 58: warning: comment on exported const ServiceAnnotations should be of the form "ServiceAnnotations ..." (golint)
    • Line 70: warning: comment on exported const KeepSourceIP should be of the form "KeepSourceIP ..." (golint)
    • Line 92: warning: comment on exported const HealthCheckNodeport should be of the form "HealthCheckNodeport ..." (golint)
    • Line 95: warning: comment on exported const AcceptProxy should be of the form "AcceptProxy ..." (golint)
    • Line 98: warning: comment on exported const SendProxy should be of the form "SendProxy ..." (golint)
    • Line 102: warning: comment on exported const OriginAPISchema should be of the form "OriginAPISchema ..." (golint)
    • Line 106: warning: comment on exported const DefaultsTimeOut should be of the form "DefaultsTimeOut ..." (golint)
    • Line 121: warning: comment on exported const HardStopAfter should be of the form "HardStopAfter ..." (golint)
    • Line 126: warning: comment on exported const DefaultsOption should be of the form "DefaultsOption ..." (golint)
    • Line 140: warning: comment on exported const BackendTLSOptions should be of the form "BackendTLSOptions ..." (golint)
    • Line 166: warning: comment on exported const IngressAffinity should be of the form "IngressAffinity ..." (golint)
    • Line 173: warning: comment on exported const IngressAffinitySessionCookieName should be of the form "IngressAffinitySessionCookieName ..." (golint)
    • Line 175: warning: comment on exported const IngressAffinitySessionCookieHash should be of the form "IngressAffinitySessionCookieHash ..." (golint)
    • Line 178: warning: comment on exported const AuthType should be of the form "AuthType ..." (golint)
    • Line 190: warning: comment on exported const AuthRealm should be of the form "AuthRealm ..." (golint)
    • Line 193: warning: comment on exported const AuthSecret should be of the form "AuthSecret ..." (golint)
    • Line 196: warning: comment on exported const AuthTLSSecret should be of the form "AuthTLSSecret ..." (golint)
    • Line 199: warning: comment on exported const AuthTLSErrorPage should be of the form "AuthTLSErrorPage ..." (golint)
    • Line 202: warning: comment on exported const AuthTLSVerifyClient should be of the form "AuthTLSVerifyClient ..." (golint)
    • Line 205: warning: comment on exported const CORSEnabled should be of the form "CORSEnabled ..." (golint)
    • Line 216: warning: comment on exported const ProxyBodySize should be of the form "ProxyBodySize ..." (golint)
    • Line 222: warning: comment on exported const SSLPassthrough should be of the form "SSLPassthrough ..." (golint)
    • Line 226: warning: comment on exported const HSTSMaxAge should be of the form "HSTSMaxAge ..." (golint)
    • Line 230: warning: comment on exported const HSTSIncludeSubDomains should be of the form "HSTSIncludeSubDomains ..." (golint)
    • Line 236: warning: comment on exported const UseNodePort should be of the form "UseNodePort ..." (golint)
    • Line 241: warning: comment on exported const ErrorFiles should be of the form "ErrorFiles ..." (golint)
    • Line 244: warning: comment on exported const LimitRPS should be of the form "LimitRPS ..." (golint)
    • Line 250: warning: comment on exported const LimitRPM should be of the form "LimitRPM ..." (golint)
    • Line 253: warning: comment on exported const LimitConnection should be of the form "LimitConnection ..." (golint)
    • Line 257: warning: comment on exported const CheckHealth should be of the form "CheckHealth ..." (golint)
    • Line 262: warning: comment on exported const RewriteTarget should be of the form "RewriteTarget ..." (golint)
    • Line 265: warning: comment on exported const WorkloadKind should be of the form "WorkloadKind ..." (golint)
    • Line 268: warning: comment on exported const NodeSelector should be of the form "NodeSelector ..." (golint)
    • Line 272: warning: comment on exported const AgentPort should be of the form "AgentPort ..." (golint)
    • Line 279: warning: exported const ACMEUserEmail should have comment (or a comment on this block) or be unexported (golint)
    • Line 285: warning: exported type ProxyProtocolVersion should have comment or be unexported (golint)
    • Line 294: warning: exported function ProxyProtocolCommand should have comment or be unexported (golint)
    • Line 305: warning: exported method Ingress.OffshootName should have comment or be unexported (golint)
    • Line 310: warning: comment on exported const CORSDefaultAllowedMethods should be of the form "CORSDefaultAllowedMethods ..." (golint)
    • Line 312: warning: exported const CORSDefaultAllowedHeaders should have comment (or a comment on this block) or be unexported (golint)
    • astarte-kubernetes-operator/apis/api/v1alpha2/conversion.go
    • Line 40: warning: receiver name dst should be consistent with previous receiver name src for Astarte (golint)
    • Line 64: warning: receiver name dst should be consistent with previous receiver name src for AstarteVoyagerIngress (golint)
    • Line 88: warning: receiver name dst should be consistent with previous receiver name src for Flow (golint)
    • astarte-kubernetes-operator/apis/api/v1alpha1/webhook.go
    • Line 33: warning: exported method Astarte.SetupWebhookWithManager should have comment or be unexported (golint)
    • Line 39: warning: exported method AstarteVoyagerIngress.SetupWebhookWithManager should have comment or be unexported (golint)
    • Line 45: warning: exported method Flow.SetupWebhookWithManager should have comment or be unexported (golint)
    • astarte-kubernetes-operator/external/voyager/v1beta1/ingress.go
    • Line 1: warning: package comment should be of the form "Package v1beta1 ..." (golint)
    • Line 25: warning: exported const ResourceKindIngress should have comment (or a comment on this block) or be unexported (golint)
    • Line 39: warning: comment on exported type Ingress should be of the form "Ingress ..." (with optional leading article) (golint)
    • Line 296: warning: exported type TCPIngressRuleValue should have comment or be unexported (golint)
    • Line 399: warning: exported type HTTPIngressBackend should have comment or be unexported (golint)
    • Line 413: warning: exported type IngressRef should have comment or be unexported (golint)
    • Line 419: warning: exported type FrontendRule should have comment or be unexported (golint)
    • Line 428: warning: exported type AuthOption should have comment or be unexported (golint)
    • Line 434: warning: exported type OAuth should have comment or be unexported (golint)
    • Line 442: warning: exported type BasicAuth should have comment or be unexported (golint)
    • Line 447: warning: exported type TLSAuthVerifyOption should have comment or be unexported (golint)
    • Line 450: warning: exported const TLSAuthVerifyOptional should have comment (or a comment on this block) or be unexported (golint)
    • Line 454: warning: exported type TLSAuth should have comment or be unexported (golint)
    • astarte-kubernetes-operator/apis/api/commontypes/astarte_common_types.go
    • Line 156: warning: comment on exported type AstarteGenericClusteredResource should be of the form "AstarteGenericClusteredResource ..." (with optional leading article) (golint)
    • Line 190: warning: comment on exported type AstartePersistentStorageSpec should be of the form "AstartePersistentStorageSpec ..." (with optional leading article) (golint)
    • Line 201: warning: comment on exported type AstarteAPISpec should be of the form "AstarteAPISpec ..." (with optional leading article) (golint)
    • Line 209: warning: comment on exported type AstarteRabbitMQSSLConfigurationSpec should be of the form "AstarteRabbitMQSSLConfigurationSpec ..." (with optional leading article) (golint)
    • Line 221: warning: comment on exported type AstarteRabbitMQConnectionSpec should be of the form "AstarteRabbitMQConnectionSpec ..." (with optional leading article) (golint)
    • Line 238: warning: comment on exported type AstarteRabbitMQSpec should be of the form "AstarteRabbitMQSpec ..." (with optional leading article) (golint)
    • Line 258: warning: comment on exported type AstarteCassandraSSLConfigurationSpec should be of the form "AstarteCassandraSSLConfigurationSpec ..." (with optional leading article) (golint)
    • Line 271: warning: comment on exported type LoginCredentialsSecret should be of the form "LoginCredentialsSecret ..." (with optional leading article) (golint)
    • Line 279: warning: comment on exported type AstarteCassandraConnectionSpec should be of the form "AstarteCassandraConnectionSpec ..." (with optional leading article) (golint)
    • Line 296: warning: comment on exported type AstarteCassandraSpec should be of the form "AstarteCassandraSpec ..." (with optional leading article) (golint)
    • Line 312: warning: comment on exported type AstarteVerneMQSpec should be of the form "AstarteVerneMQSpec ..." (with optional leading article) (golint)
    • Line 349: warning: comment on exported type AstarteGenericComponentSpec should be of the form "AstarteGenericComponentSpec ..." (with optional leading article) (golint)
    • Line 358: warning: comment on exported type AstarteDataUpdaterPlantSpec should be of the form "AstarteDataUpdaterPlantSpec ..." (with optional leading article) (golint)
    • Line 373: warning: comment on exported type AstarteTriggerEngineSpec should be of the form "AstarteTriggerEngineSpec ..." (with optional leading article) (golint)
    • Line 389: warning: comment on exported type AstarteAppengineAPISpec should be of the form "AstarteAppengineAPISpec ..." (with optional leading article) (golint)
    • Line 406: warning: comment on exported type AstarteDashboardConfigAuthSpec should be of the form "AstarteDashboardConfigAuthSpec ..." (with optional leading article) (golint)
    • Line 414: warning: comment on exported type AstarteDashboardConfigSpec should be of the form "AstarteDashboardConfigSpec ..." (with optional leading article) (golint)
    • Line 433: warning: comment on exported type AstarteDashboardSpec should be of the form "AstarteDashboardSpec ..." (with optional leading article) (golint)
    • Line 441: warning: comment on exported type AstarteComponentsSpec should be of the form "AstarteComponentsSpec ..." (with optional leading article) (golint)
    • Line 465: warning: comment on exported type AstarteCFSSLDBConfigSpec should be of the form "AstarteCFSSLDBConfigSpec ..." (with optional leading article) (golint)
    • Line 472: warning: comment on exported type AstarteCFSSLCSRRootCAKeySpec should be of the form "AstarteCFSSLCSRRootCAKeySpec ..." (with optional leading article) (golint)
    • Line 479: warning: comment on exported type AstarteCFSSLCSRRootCANamesSpec should be of the form "AstarteCFSSLCSRRootCANamesSpec ..." (with optional leading article) (golint)
    • Line 489: warning: comment on exported type AstarteCFSSLCSRRootCACASpec should be of the form "AstarteCFSSLCSRRootCACASpec ..." (with optional leading article) (golint)
    • Line 495: warning: comment on exported type AstarteCFSSLCSRRootCASpec should be of the form "AstarteCFSSLCSRRootCASpec ..." (with optional leading article) (golint)
    • Line 504: warning: comment on exported type AstarteCFSSLCARootConfigSigningCAConstraintSpec should be of the form "AstarteCFSSLCARootConfigSigningCAConstraintSpec ..." (with optional leading article) (golint)
    • Line 512: warning: comment on exported type AstarteCFSSLCARootConfigSigningDefaultSpec should be of the form "AstarteCFSSLCARootConfigSigningDefaultSpec ..." (with optional leading article) (golint)
    • Line 520: warning: comment on exported type AstarteCFSSLCARootConfigSigningSpec should be of the form "AstarteCFSSLCARootConfigSigningSpec ..." (with optional leading article) (golint)
    • Line 526: warning: comment on exported type AstarteCFSSLCARootConfigSpec should be of the form "AstarteCFSSLCARootConfigSpec ..." (with optional leading article) (golint)
    • Line 532: warning: comment on exported type AstarteCFSSLSpec should be of the form "AstarteCFSSLSpec ..." (with optional leading article) (golint)
    • Line 562: warning: comment on exported type AstarteSystemKeyspaceSpec should be of the form "AstarteSystemKeyspaceSpec ..." (with optional leading article) (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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!