Repository Analysis

prometheus/prometheus

The Prometheus monitoring system and time series database.

2.3 Likely human-written View on GitHub
2.3
Adjusted Score
2.3
Raw Score
100%
Time Factor
2026-05-29
Last Push
64,200
Stars
Go
Language
482,575
Lines of Code
1464
Files
1049
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 2HIGH 0MEDIUM 11LOW 1036

Pattern Findings

1049 matches across 10 categories. Click a row to expand file-level details.

Over-Commented Block1011 hits · 1006 pts
SeverityFileLineSnippet
LOW.golangci.yml161 # Suggest replacing omitempty with omitzero for struct fields.
LOWcmd/prometheus/reload_test.go1// Copyright The Prometheus Authors
LOWcmd/prometheus/main_upgrade_test.go1// Copyright The Prometheus Authors
LOWcmd/prometheus/scrape_failure_log_test.go1// Copyright The Prometheus Authors
LOWcmd/prometheus/upload_test.go1// Copyright The Prometheus Authors
LOWcmd/prometheus/query_log_test.go1// Copyright The Prometheus Authors
LOWcmd/prometheus/features_test.go1// Copyright The Prometheus Authors
LOWcmd/prometheus/main_unix_test.go1// Copyright The Prometheus Authors
LOWcmd/prometheus/main.go1// Copyright The Prometheus Authors
LOWcmd/prometheus/main_test.go1// Copyright The Prometheus Authors
LOWcmd/prometheus/main_test.go1001 require.Zero(t, highestTimestamp)
LOWcmd/promtool/rules_test.go1// Copyright The Prometheus Authors
LOWcmd/promtool/query.go1// Copyright The Prometheus Authors
LOWcmd/promtool/backfill_test.go1// Copyright The Prometheus Authors
LOWcmd/promtool/unittest.go1// Copyright The Prometheus Authors
LOWcmd/promtool/metrics.go1// Copyright The Prometheus Authors
LOWcmd/promtool/analyze_test.go1// Copyright The Prometheus Authors
LOWcmd/promtool/metrics_test.go1// Copyright The Prometheus Authors
LOWcmd/promtool/rules.go1// Copyright The Prometheus Authors
LOWcmd/promtool/unittest_test.go1// Copyright The Prometheus Authors
LOWcmd/promtool/sd_test.go1// Copyright The Prometheus Authors
LOWcmd/promtool/tsdb_test.go1// Copyright The Prometheus Authors
LOWcmd/promtool/archive.go1// Copyright The Prometheus Authors
LOWcmd/promtool/debug.go1// Copyright The Prometheus Authors
LOWcmd/promtool/backfill.go1// Copyright The Prometheus Authors
LOWcmd/promtool/tsdb_posix_test.go1// Copyright The Prometheus Authors
LOWcmd/promtool/analyze.go1// Copyright The Prometheus Authors
LOWcmd/promtool/tsdb.go1// Copyright The Prometheus Authors
LOWcmd/promtool/sd.go1// Copyright The Prometheus Authors
LOWcmd/promtool/main.go1// Copyright The Prometheus Authors
LOWcmd/promtool/main_test.go1// Copyright The Prometheus Authors
LOWtracing/tracing_test.go1// Copyright The Prometheus Authors
LOWtracing/tracing.go1// Copyright The Prometheus Authors
LOWdocumentation/examples/prometheus-marathon.yml21 # in their app definitions. Example using a port mapping (container or bridge networking):
LOWdocumentation/examples/prometheus-kubernetes.yml1# A scrape configuration for running Prometheus on a Kubernetes cluster.
LOWdocumentation/examples/prometheus-kubernetes.yml61 action: keep
LOWdocumentation/examples/prometheus-kubernetes.yml101 # retrieve those metrics.
LOWdocumentation/examples/prometheus-kubernetes.yml121
LOWdocumentation/examples/prometheus-kubernetes.yml161 # regex: true
LOWdocumentation/examples/prometheus-kubernetes.yml261
LOWdocumentation/examples/prometheus-kubernetes.yml281 # - source_labels: [__meta_kubernetes_pod_annotation_example_io_metric_path]
LOWdocumentation/examples/prometheus-dockerswarm.yml21 - source_labels: [__meta_dockerswarm_node_address]
LOWdocumentation/examples/prometheus-eureka.yml21 # eureka:
LOWdocumentation/examples/prometheus-eureka.yml41 # Example relabel to customize metric path based on application
LOWdocumentation/examples/prometheus-eureka.yml61 #
LOWdocumentation/examples/prometheus-nomad.yml1# An example scrape configuration for running Prometheus with
LOW…cumentation/examples/custom-sd/adapter/adapter_test.go1// Copyright The Prometheus Authors
LOWdocumentation/examples/custom-sd/adapter/adapter.go1// Copyright The Prometheus Authors
LOWdocumentation/examples/custom-sd/adapter-usage/main.go1// Copyright The Prometheus Authors
LOW…xamples/remote_storage/example_write_adapter/server.go1// Copyright The Prometheus Authors
LOW…examples/remote_storage/remote_storage_adapter/main.go1// Copyright The Prometheus Authors
LOW…mote_storage/remote_storage_adapter/influxdb/client.go1// Copyright The Prometheus Authors
LOW…storage/remote_storage_adapter/influxdb/client_test.go1// Copyright The Prometheus Authors
LOW…orage/remote_storage_adapter/opentsdb/tagvalue_test.go1// Copyright The Prometheus Authors
LOW…mote_storage/remote_storage_adapter/opentsdb/client.go1// Copyright The Prometheus Authors
LOW…te_storage/remote_storage_adapter/opentsdb/tagvalue.go1// Copyright The Prometheus Authors
LOW…te_storage/remote_storage_adapter/opentsdb/tagvalue.go21)
LOW…te_storage/remote_storage_adapter/opentsdb/tagvalue.go41// - If ':' is encountered, it is replaced by '_.'.
LOW…storage/remote_storage_adapter/opentsdb/client_test.go1// Copyright The Prometheus Authors
LOW…mote_storage/remote_storage_adapter/graphite/escape.go1// Copyright The Prometheus Authors
951 more matches not shown…
Hallucination Indicators2 hits · 20 pts
SeverityFileLineSnippet
CRITICALtsdb/ooo_head_read.go515 ir.ch.head.metrics.seriesNotFound.Inc()
CRITICALtsdb/ooo_head_read.go528 getOOOSeriesChunks(s, ir.ch.head.opts.EnableXOR2Encoding.Load(), ir.ch.mint, ir.ch.maxt, 0, ir.ch.lastMmapRef, false, 0
Verbosity Indicators11 hits · 16 pts
SeverityFileLineSnippet
LOWcmd/prometheus/scrape_failure_log_test.go56 // Step 1: Set up an initial Prometheus configuration that globally
LOWcmd/prometheus/scrape_failure_log_test.go99 // Step 2: Update the Prometheus configuration to remove the scrape failure
LOWcmd/prometheus/scrape_failure_log_test.go133 // Step 3: Re-add the scrape failure log file setting, but this time under
LOWtsdb/head_append_v2_test.go4824 // Step 1: Establish a series with histogram data
LOWtsdb/head_append_v2_test.go4830 // Step 2: Add a float staleness marker
LOWtsdb/head_test.go7627 // Step 1: Establish a series with histogram data
LOWtsdb/head_test.go7633 // Step 2: Add a float staleness marker
LOWtsdb/head_test.go8062 // Step 1: Create a batch of series and make them stale.
LOWtsdb/head_test.go8074 // Step 2: Truncate stale series. This removes them from the Head and
LOWtsdb/head_test.go8086 // Step 3: Add new series AFTER the truncation. In the WAL, these series
LOWtsdb/head_test.go8099 // Step 4: Close and re-open the Head to trigger WAL replay.
AI Slop Vocabulary5 hits · 15 pts
SeverityFileLineSnippet
MEDIUMprompb/io/prometheus/client/decoder.go33 // We leverage the fact those two don't collide.
MEDIUMtsdb/fileutil/direct_io_force.go14// This allows seamless testing of the Direct I/O writer across all tsdb tests.
MEDIUMweb/api/v1/search_test.go1099 // No line should decode as a success trailer. This is robust to a
MEDIUMscrape/st_synthesis.go47// to leverage native DetectReset and Sub methods.
MEDIUMpromql/functions.go541 // extrapolationThreshold below. Essentially, we are assuming a more or
Self-Referential Comments4 hits · 12 pts
SeverityFileLineSnippet
MEDIUMdocumentation/examples/prometheus-dockerswarm.yml10 # Create a job for Docker daemons.
MEDIUMdocumentation/examples/prometheus-dockerswarm.yml25 # Create a job for Docker Swarm containers.
MEDIUMdocumentation/examples/prometheus-docker.yml9 # Create a job for Docker daemon.
MEDIUMdocumentation/examples/prometheus-docker.yml18 # Create a job for Docker Swarm containers.
Slop Phrases5 hits · 10 pts
SeverityFileLineSnippet
LOWcmd/prometheus/main.go1229 // Don't forget to release the reloadReady channel so that waiting blocks can exit normally.
MEDIUMdocumentation/examples/prometheus-eureka.yml19 # If you are using SpringBoot, you can add metadata using eureka.instance.metadataMap like this:
LOW.github/ISSUE_TEMPLATE/bug_report.yml52 description: Insert relevant configuration here. Don't forget to remove secrets.
LOW.github/ISSUE_TEMPLATE/bug_report.yml68 description: Insert relevant configuration here. Don't forget to remove secrets.
MEDIUMmodel/textparse/benchmark_test.go42// For local iteration, feel free to adjust cases/comment out code etc.
Hyper-Verbose Identifiers7 hits · 7 pts
SeverityFileLineSnippet
LOWweb/ui/react-app/src/pages/graph/HistogramHelpers.ts5export function calculateDefaultExpBucketWidth(
LOW…/ui/mantine-ui/src/pages/AlertmanagerDiscoveryPage.tsx12export default function AlertmanagerDiscoveryPage() {
LOWweb/ui/mantine-ui/src/pages/query/HistogramHelpers.ts3export function calculateDefaultExpBucketWidth(
LOWweb/ui/module/codemirror-promql/src/complete/hybrid.ts143function getMetricNameInVectorSelector(tree: SyntaxNode, state: EditorState): string {
LOWweb/ui/module/codemirror-promql/src/complete/hybrid.ts182export function computeEndCompletePosition(node: SyntaxNode, pos: number): number {
LOWweb/ui/module/codemirror-promql/src/complete/hybrid.ts222function computeStartCompleteLabelPositionInLabelMatcherOrInGroupingLabel(node: SyntaxNode, pos: number): number {
LOWweb/ui/module/codemirror-promql/src/complete/hybrid.ts240export function computeStartCompletePosition(state: EditorState, node: SyntaxNode, pos: number): number {
Fake / Example Data2 hits · 2 pts
SeverityFileLineSnippet
LOWutil/annotations/annotations_test.go46 warnings, infos := annos.AsStrings("lorem ipsum dolor sit amet", 0, 0)
LOWutil/annotations/annotations_test.go46 warnings, infos := annos.AsStrings("lorem ipsum dolor sit amet", 0, 0)
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippet
LOWweb/api/testhelpers/request.go30// Example usage:
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippet
LOWscripts/sync_repo_files.sh293 # Check if a PR is already opened for the branch from the prombot fork.