Repository Analysis

ollama/ollama

Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.

0.8 Likely human-written View on GitHub
0.8
Adjusted Score
0.8
Raw Score
100%
Time Factor
2026-05-29
Last Push
172,629
Stars
Go
Language
344,222
Lines of Code
944
Files
290
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 0MEDIUM 8LOW 282

Pattern Findings

290 matches across 8 categories. Click a row to expand file-level details.

Over-Commented Block264 hits · 236 pts
SeverityFileLineSnippet
LOWtypes/model/name.go101// ParseName parses and assembles a Name from a name string. The
LOWtypes/model/name.go121// namespace:
LOWllm/llama_server.go1// llama_server.go wraps the llama-server binary as a subprocess
LOWllm/llama_server.go2381// deviceFreeRegex matches per-device free VRAM reported at model load time:
LOWdiscover/llama_server.go21)
LOWdiscover/runner.go61
LOWapp/types/not/found.go1//go:build windows || darwin
LOWapp/types/not/found.go21//
LOWapp/webview/webview.h41 *
LOWapp/webview/webview.h61#endif
LOWapp/webview/webview.h81
LOWapp/webview/webview.h141
LOWapp/webview/webview.h401#elif defined(_WIN32)
LOWapp/webview/webview.h421#endif
LOWapp/webview/webview.h1141//
LOWapp/webview/webview.h1201
LOWapp/webview/webview.h1501
LOWapp/webview/webview.h1921 // Stop the main run loop so that we can return
LOWapp/webview/webview.h2021 // disable the feature by default (macOS 13.3 and later) and support
LOWapp/webview/webview.h2121//
LOWapp/webview/webview.h2581#define WEBVIEW_MSWEBVIEW2_EXPLICIT_LINK WEBVIEW_MSWEBVIEW2_BUILTIN_IMPL
LOWapp/webview/webview.go101 // Window returns a native window handle pointer. When using GTK backend the
LOWapp/webview/webview.go121 // Example: w.SetHtml(w, "<h1>Hello</h1>");
LOWapp/dialog/dlgs.go1//go:build windows || darwin
LOWapp/dialog/cocoa/dlg.m1#import <Cocoa/Cocoa.h>
LOWcmake/mlx/CMakeLists.txt121# Install headers for NVRTC JIT compilation at runtime.
LOWtokenizer/bytepairencoding_test.go241}
LOWserver/routes_test.go501 Expected: func(t *testing.T, resp *http.Response) {
LOWserver/internal/cache/blob/cache.go21
LOWserver/internal/cache/blob/cache.go41// <namespace>/
LOWserver/internal/cache/blob/cache.go141 }
LOWserver/internal/cache/blob/cache.go161// blob store. This is done to ensure that future calls to [Get] succeed in
LOWserver/internal/cache/blob/cache.go201
LOWserver/internal/manifest/manifest.go1// Package manifest provides documentation for the Ollama manifest format.
LOWserver/internal/manifest/manifest.go21//
LOWserver/internal/manifest/manifest.go41// the template is the default template for the model.
LOWserver/internal/manifest/manifest.go61//
LOWserver/internal/manifest/manifest.go81//
LOWserver/internal/manifest/manifest.go101// "size": 3456
LOWserver/internal/internal/names/name.go21 t string
LOWserver/internal/registry/server.go181type params struct {
LOWserver/internal/registry/server.go201 // confusing flags such as this.
LOWserver/internal/client/ollama/trace.go1package ollama
LOWserver/internal/client/ollama/registry.go81 dir = filepath.Join(home, ".ollama", "models")
LOWserver/internal/client/ollama/registry.go181// the default mask. If the name is already fully qualified, it is returned
LOWserver/internal/client/ollama/registry.go201 Key crypto.PrivateKey
LOWserver/internal/client/ollama/registry.go841 }
LOWserver/internal/client/ollama/registry_test.go81// single: one layer with the contents "exists"
LOWkvcache/cache.go21 // Get returns the history of key and value tensors plus a mask
LOWkvcache/cache.go41 // Most models will not need to use this.
LOWkvcache/cache.go61 StartForward(ctx ml.Context, batch input.Batch, reserve bool) error
LOWml/backend.go41// CacheConfig controls optimizations (mostly backend-specific) that may transform
LOWml/backend.go241
LOWml/device.go661// NeedsInitValidation returns true if the device in question has the potential
LOWml/nn/attention.go1package nn
LOWscripts/create-dmg.sh561# Adding EULA resources
LOWscripts/build_linux.sh1#!/bin/sh
LOWscripts/build_darwin.sh1#!/bin/sh
LOWmodel/model.go61 // opaque metadata. Typically, the tensors might be views into an embedding
LOWmodel/renderers/qwen3vl_thinking_test.go101 // <|im_start|>assistant
204 more matches not shown…
Self-Referential Comments4 hits · 12 pts
SeverityFileLineSnippet
MEDIUMscripts/create-dmg.sh5# Create a read-only disk image of the contents of a folder
MEDIUMscripts/create-dmg.sh344# Create the image
MEDIUMscripts/create-dmg.sh368# Create the DMG with the specified size or the hdiutil estimation
MEDIUMscripts/build_darwin.sh202 # Create a mock Squirrel.framework bundle
AI Slop Vocabulary4 hits · 11 pts
SeverityFileLineSnippet
MEDIUMdiscover/runner.go172 // Any Libraries that utilize numeric IDs need adjusting based on any possible filtering taking place
MEDIUMapp/ui/app/package-lock.json11543 "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.2.tgz",
MEDIUMthinking/template.go85 // TODO(drifkin): to be more robust, check that it's in the action
MEDIUMx/imagegen/cmd/engine/generate.go38 // Definitely invalid, skip this byte
Fake / Example Data8 hits · 8 pts
SeverityFileLineSnippet
LOWintegration/llm_image_test.go88 System: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed aliquet, justo in malesuada lobortis, odio ligul
LOWintegration/llm_image_test.go88 System: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed aliquet, justo in malesuada lobortis, odio ligul
LOWtokenizer/sentencepiece_test.go76 "Long text: " + "Lorem ipsum dolor sit amet, consectetur adipiscing elit. " +
LOWtokenizer/sentencepiece_test.go76 "Long text: " + "Lorem ipsum dolor sit amet, consectetur adipiscing elit. " +
LOWmodel/parsers/olmo3_test.go390 input: `send_email(to="user@example.com", subject="Hello", body="Test message")`,
LOWmodel/parsers/olmo3_test.go396 "to": "user@example.com",
LOWx/imagegen/tokenizer/tokenizer_test.go119 "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
LOWx/imagegen/tokenizer/tokenizer_test.go119 "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
Verbosity Indicators5 hits · 8 pts
SeverityFileLineSnippet
LOWx/mlxrunner/sample/sample_test.go288 // Step 1: logits favor token 1 (trimmed). If the trim were broken it
LOWx/mlxrunner/sample/sample_test.go297 // Step 2: logits favor token 2 (rotated out). If the ring wrap were
LOWllama/compat/llama-ollama-compat.cpp2194 // Step 1: rename SAM prefix `s.` -> `v.sam.` only at the start of names
LOWllama/compat/llama-ollama-compat.cpp2211 // Step 2: SAM `s.position_embd` (no `.weight` suffix) — handle exactly,
LOWllama/compat/llama-ollama-compat.cpp2215 // Step 3: substring renames for CLIP, SAM block leaves, and projector.
Redundant / Tautological Comments3 hits · 4 pts
SeverityFileLineSnippet
LOWscripts/create-dmg.sh599 # Check if hdiutil supports internet-enable
LOWscripts/install.sh135 # Check if .tar.zst is available
LOWscripts/build_docker.sh7# Set PUSH to a non-empty string to trigger push instead of load
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippet
LOWintegration/model_perf_test.go36// Example usage:
Hyper-Verbose Identifiers1 hit · 1 pts
SeverityFileLineSnippet
LOWapp/ui/app/src/components/Message.tsx88function processBrowserToolContent(content: string): BrowserToolContent {