Repository Analysis

nats-io/nats-server

High-Performance server for NATS.io, the cloud and edge native messaging system.

0.9 Likely human-written View on GitHub
0.9
Adjusted Score
0.9
Raw Score
100%
Time Factor
2026-05-29
Last Push
19,930
Stars
Go
Language
427,555
Lines of Code
303
Files
348
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 1MEDIUM 3LOW 344

Pattern Findings

348 matches across 5 categories. Click a row to expand file-level details.

Over-Commented Block332 hits · 332 pts
SeverityFileLineSnippet
LOWmain.go1// Copyright 2012-2025 The NATS Authors
LOWlogger/log.go1// Copyright 2012-2025 The NATS Authors
LOWlogger/log_test.go1// Copyright 2012-2025 The NATS Authors
LOWlogger/syslog.go1// Copyright 2012-2025 The NATS Authors
LOWlogger/syslog_test.go1// Copyright 2012-2025 The NATS Authors
LOWlogger/syslog_windows.go1// Copyright 2012-2025 The NATS Authors
LOWlogger/syslog_windows_test.go1// Copyright 2012-2025 The NATS Authors
LOWtest/pedantic_test.go1// Copyright 2012-2019 The NATS Authors
LOWtest/verbose_test.go1// Copyright 2012-2018 The NATS Authors
LOWtest/auth_test.go1// Copyright 2012-2024 The NATS Authors
LOWtest/cluster_test.go1// Copyright 2013-2025 The NATS Authors
LOWtest/services_test.go1// Copyright 2020-2025 The NATS Authors
LOWtest/fanout_test.go1// Copyright 2018-2025 The NATS Authors
LOWtest/test.go1// Copyright 2012-2025 The NATS Authors
LOWtest/accounts_cycles_test.go1// Copyright 2020-2025 The NATS Authors
LOWtest/operator_test.go1// Copyright 2018-2025 The NATS Authors
LOWtest/routes_test.go1// Copyright 2012-2025 The NATS Authors
LOWtest/test_test.go1// Copyright 2016-2025 The NATS Authors
LOWtest/service_latency_test.go1// Copyright 2019-2025 The NATS Authors
LOWtest/new_routes_test.go1// Copyright 2018-2024 The NATS Authors
LOWtest/new_routes_test.go1941 // With defect, only 1 subscription would be found during the unsubscribe,
LOWtest/monitor_test.go1// Copyright 2012-2024 The NATS Authors
LOWtest/port_test.go1// Copyright 2014-2019 The NATS Authors
LOWtest/ports_test.go1// Copyright 2018-2024 The NATS Authors
LOWtest/route_discovery_test.go1// Copyright 2015-2024 The NATS Authors
LOWtest/proto_test.go1// Copyright 2012-2024 The NATS Authors
LOWtest/ping_test.go1// Copyright 2012-2025 The NATS Authors
LOWtest/ocsp_test.go1// Copyright 2021-2025 The NATS Authors
LOWtest/system_services_test.go1// Copyright 2019-2025 The NATS Authors
LOWtest/cluster_tls_test.go1// Copyright 2013-2025 The NATS Authors
LOWtest/gateway_test.go1// Copyright 2018-2025 The NATS Authors
LOWtest/opts_test.go1// Copyright 2015-2025 The NATS Authors
LOWtest/client_auth_test.go1// Copyright 2016-2025 The NATS Authors
LOWtest/bench_test.go1// Copyright 2012-2025 The NATS Authors
LOWtest/pid_test.go1// Copyright 2012-2025 The NATS Authors
LOWtest/tls_test.go1// Copyright 2015-2025 The NATS Authors
LOWtest/tls_test.go1361 err error
LOWtest/leafnode_test.go1// Copyright 2019-2025 The NATS Authors
LOWtest/client_cluster_test.go1// Copyright 2013-2025 The NATS Authors
LOWtest/gosrv_test.go1// Copyright 2012-2025 The NATS Authors
LOWtest/user_authorization_test.go1// Copyright 2016-2025 The NATS Authors
LOWtest/maxpayload_test.go1// Copyright 2015-2025 The NATS Authors
LOWtest/norace_test.go1// Copyright 2019-2025 The NATS Authors
LOWtest/ocsp_peer_test.go1// Copyright 2023-2025 The NATS Authors
LOWinternal/antithesis/noop.go1// Copyright 2022-2024 The NATS Authors
LOWinternal/antithesis/test_assert.go1// Copyright 2022-2024 The NATS Authors
LOWinternal/antithesis/test_assert.go21 "fmt"
LOWinternal/antithesis/test_assert.go61 // Always print the stack trace
LOWinternal/testhelper/logging.go1// Copyright 2019-2025 The NATS Authors
LOWinternal/ocsp/ocsp.go1// Copyright 2019-2024 The NATS Authors
LOWserver/norace_2_test.go1// Copyright 2018-2025 The NATS Authors
LOWserver/reload.go1// Copyright 2017-2026 The NATS Authors
LOWserver/reload.go2681 s.mu.Lock()
LOWserver/jetstream_cluster.go1// Copyright 2020-2025 The NATS Authors
LOWserver/jetstream_cluster.go41
LOWserver/jetstream_cluster.go2841 if !samePeers {
LOWserver/log.go1// Copyright 2012-2025 The NATS Authors
LOWserver/accounts.go1// Copyright 2018-2025 The NATS Authors
LOWserver/disk_avail_netbsd.go1// Copyright 2022-2025 The NATS Authors
LOWserver/msgtrace.go1// Copyright 2024-2026 The NATS Authors
272 more matches not shown…
Verbosity Indicators11 hits · 16 pts
SeverityFileLineSnippet
LOWserver/reload.go451 // If the mode is "s2_auto", we need to check if there is really
LOWserver/reload.go1275 // If the mode is "s2_auto", we need to check if there is really
LOWserver/jetstream_cluster.go2130 // If we're not recovering, we need to check if we have any left-over streams or consumers that aren't
LOWserver/auth_callout_test.go2978 // Step 1: Inject zombie connections into FOO account.
LOWserver/auth_callout_test.go2990 // Step 2: Connect legitimate clients. FOO has max_connections: 5.
LOWserver/route.go1781 // We need to check if this route is "no_pool" in which case we
LOWserver/client.go5596 // We need to check if this is a request that has a stamped client information header.
LOWserver/consumer.go6463 // We need to check if the pending items left are still valid.
LOWserver/leafnode.go2750 // If we are a spoke, we need to check if we are allowed to send this subscription over to the hub.
LOWserver/jetstream_cluster_3_test.go4652 // we need to check if it restored from the snapshot properly
LOWserver/raft.go4428 // This is us. We need to check if we can become the leader.
AI Slop Vocabulary3 hits · 9 pts
SeverityFileLineSnippet
MEDIUMserver/mqtt.go4370 // TODO: would prefer a more robust and performant way of checking the
MEDIUMserver/jetstream_leafnode_test.go2012 // Pointer-equality on *subscription is timing-robust:
MEDIUMserver/avl/seqset.go67// This will more effectively utilize space versus self selecting.
Synthetic Comment Markers1 hit · 8 pts
SeverityFileLineSnippet
HIGHserver/events.go3210 // Reload the server config, as requested.
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippet
LOWserver/monitor_test.go5612 # Set this to make sure that it does not impact secure monitoring