Gofmt formats Go programs. We run gofmt -s
on your code, where -s
is for the "simplify" command
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.
Golint is a linter for Go source code.
-
elasticsearch_exporter/struct.go
- Line 11: warning: exported type NodeStatsNodeResponse should have comment or be unexported (golint)
- Line 43: warning: exported type NodeStatsJVMGCResponse should have comment or be unexported (golint)
- Line 47: warning: exported type NodeStatsJVMGCCollectorResponse should have comment or be unexported (golint)
- Line 52: warning: exported type NodeStatsJVMBufferPoolResponse should have comment or be unexported (golint)
- Line 58: warning: exported type NodeStatsJVMMemResponse should have comment or be unexported (golint)
- Line 66: warning: exported type NodeStatsNetworkResponse should have comment or be unexported (golint)
- Line 89: warning: exported type NodeStatsTCPResponse should have comment or be unexported (golint)
- Line 120: warning: exported type NodeStatsIndicesDocsResponse should have comment or be unexported (golint)
- Line 125: warning: exported type NodeStatsIndicesRefreshResponse should have comment or be unexported (golint)
- Line 130: warning: exported type NodeStatsIndicesTranslogResponse should have comment or be unexported (golint)
- Line 135: warning: exported type NodeStatsIndicesSegmentsResponse should have comment or be unexported (golint)
- Line 140: warning: exported type NodeStatsIndicesStoreResponse should have comment or be unexported (golint)
- Line 145: warning: exported type NodeStatsIndicesIndexingResponse should have comment or be unexported (golint)
- Line 154: warning: exported type NodeStatsIndicesMergesResponse should have comment or be unexported (golint)
- Line 164: warning: exported type NodeStatsIndicesGetResponse should have comment or be unexported (golint)
- Line 174: warning: exported type NodeStatsIndicesSearchResponse should have comment or be unexported (golint)
- Line 184: warning: exported type NodeStatsIndicesFlushResponse should have comment or be unexported (golint)
- Line 189: warning: exported type NodeStatsIndicesCacheResponse should have comment or be unexported (golint)
- Line 211: warning: exported type NodeStatsOSMemResponse should have comment or be unexported (golint)
- Line 218: warning: exported type NodeStatsOSSwapResponse should have comment or be unexported (golint)
- Line 223: warning: exported type NodeStatsOSCPUResponse should have comment or be unexported (golint)
- Line 239: warning: exported type NodeStatsProcessMemResponse should have comment or be unexported (golint)
- Line 245: warning: exported type NodeStatsProcessCPUResponse should have comment or be unexported (golint)
- Line 252: warning: exported type NodeStatsHTTPResponse should have comment or be unexported (golint)
- Line 263: warning: exported type NodeStatsFSDataResponse should have comment or be unexported (golint)
-
elasticsearch_exporter/exporter.go
- Line 17: warning: exported type VecInfo should have comment or be unexported (golint)
- Line 498: warning: don't use underscores in Go names; var used_percent should be usedPercent (golint)
- Line 499: warning: don't use underscores in Go names; var free_percent should be freePercent (golint)
Checks whether your project has a LICENSE file.
No problems detected. Good job!
IneffAssign detects ineffectual assignments in Go code.
-
elasticsearch_exporter/exporter.go
- Line 384: warning: e.counterVecs["jvm_gc_collection_seconds_count"].WithLabelValues(allStats.ClusterName, stats.Host, collector).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 385: warning: e.counterVecs["jvm_gc_collection_seconds_sum"].WithLabelValues(allStats.ClusterName, stats.Host, collector).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 397: warning: e.counterVecs["thread_pool_completed_count"].WithLabelValues(allStats.ClusterName, stats.Host, pool).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 398: warning: e.counterVecs["thread_pool_rejected_count"].WithLabelValues(allStats.ClusterName, stats.Host, pool).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 415: warning: e.counters["indices_fielddata_evictions"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 418: warning: e.counters["indices_filter_cache_evictions"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 421: warning: e.counters["indices_query_cache_evictions"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 424: warning: e.counters["indices_request_cache_evictions"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 426: warning: e.counters["indices_translog_operations"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 427: warning: e.counters["indices_translog_size_in_bytes"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 429: warning: e.counters["indices_get_time_ms"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 430: warning: e.counters["indices_get_total"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 432: warning: e.counters["indices_get_missing_time_ms"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 433: warning: e.counters["indices_get_missing_total"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 435: warning: e.counters["indices_get_exists_time_ms"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 436: warning: e.counters["indices_get_exists_total"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 438: warning: e.counters["indices_search_query_time_ms"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 439: warning: e.counters["indices_search_query_total"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 441: warning: e.counters["indices_search_fetch_time_ms"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 442: warning: e.counters["indices_search_fetch_total"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 451: warning: e.counters["indices_store_throttle_time_ms_total"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 453: warning: e.counters["indices_flush_total"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 454: warning: e.counters["indices_flush_time_ms_total"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 456: warning: e.counters["indices_indexing_index_time_ms_total"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 457: warning: e.counters["indices_indexing_index_total"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 459: warning: e.counters["indices_indexing_delete_time_ms_total"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 460: warning: e.counters["indices_indexing_delete_total"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 462: warning: e.counters["indices_merges_total_time_ms_total"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 463: warning: e.counters["indices_merges_total_size_bytes_total"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 464: warning: e.counters["indices_merges_total"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 465: warning: e.counters["indices_merges_docs_total"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 467: warning: e.counters["indices_refresh_time_ms_total"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 468: warning: e.counters["indices_refresh_total"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 470: warning: e.counters["indices_search_query_total"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 471: warning: e.counters["indices_search_query_time_ms_total"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 473: warning: e.counters["indices_search_fetch_total"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 474: warning: e.counters["indices_search_fetch_time_ms_total"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 477: warning: e.counters["transport_rx_packets_total"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 478: warning: e.counters["transport_rx_size_bytes_total"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 479: warning: e.counters["transport_tx_packets_total"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 480: warning: e.counters["transport_tx_size_bytes_total"].WithLabelValues(allStats.ClusterName, stats.Host).Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 489: warning: e.counterVecs["process_cpu_time_seconds_sum"].WithLabelValues(allStats.ClusterName, stats.Host, "total").Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 490: warning: e.counterVecs["process_cpu_time_seconds_sum"].WithLabelValues(allStats.ClusterName, stats.Host, "sys").Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
- Line 491: warning: e.counterVecs["process_cpu_time_seconds_sum"].WithLabelValues(allStats.ClusterName, stats.Host, "user").Set undefined (type prometheus.Counter has no field or method Set) (ineffassign)
Misspell Finds commonly misspelled English words
No problems detected. Good job!