Repository navigation
Code Quality Violations
Audience: Programmers | Mixed
Thread Context: N/A (development/process reference)
Platform/Backend Scope: All (codebase-wide audit)
This page records a March–April 2026 audit of CLAUDE.md quality-guideline violations beyond file/class size: oversized functions, classes with too many private helpers, and naming conventions. It is a historical snapshot with a verified-current status column — most of the originally-cited violations have since been resolved, and the codebase has been substantially reorganized (several cited files have moved or been split).
The original audit was marked "Mostly Resolved." As of 2026-06-08 verification, that remains accurate and most specifics have moved further toward resolution.
-
2026-03-31: Down from 66 oversized functions to 9 remaining (86% reduction).
RegisterDefaultCommandssplit into 3 focused functions.InspectorComponentRenderers.cppsplit into 4 domain files.MaterialSystem"duplicates" confirmed as wrapper+impl, not true duplicates. -
2026-03-31 (optimization pass):
SaveSystem::RegisterBuiltins()(425 lines) split into 3 domain functions;SaveSystem::SerializeWorld()(124 lines) refactored with aTrySerialize<T>template;ConsoleAppRun/ReadEngineInput/ReadUserInput split into focused helpers. -
2026-04-04: All 9 remaining oversized functions reviewed and annotated with
// NOTE: Intentionally exceeds 50-line guidelinecomments explaining why each is left as-is (linear initialization, rendering pipeline, event wiring, UI layout).
The original audit used a 50-line trigger. The current CLAUDE.md guideline is ~60 lines, and explicitly treats clear linear flow as acceptable. The remaining intentionally-long functions carry // NOTE: Intentionally exceeds ... annotations — verified present (10 occurrences across files including GraphicsEngineWindows.cpp, SparkEngineWindows.cpp, EditorUI.cpp, EditorNotificationManager.cpp).
Many cited files have been split or relocated, so the original line counts no longer apply:
| Function (as cited) | Original file | Original lines | Current reality (2026-06-08) |
|---|---|---|---|
RegisterEngineConsoleCommands() |
SparkEngine.cpp | 555 |
SparkEngine.cpp is now 443 lines total — split out |
main() / wWinMain()
|
SparkEngine.cpp | 488 / 330 | Platform entry points split into SparkEngineWindows.cpp / SparkEngineLinux.cpp
|
RenderMainMenuBar() / CreatePanels()
|
EditorUI.cpp | 514 / 412 |
EditorUI.cpp still large (1,516 lines) — see live offenders below |
RegisterHealthCommands() etc. |
SparkConsole.cpp | 453 + |
SparkConsole.cpp trimmed to 641 lines total |
LoadFromFile() / Console_ValidateMaterials()
|
MaterialSystem.cpp | 407 / 247 |
MaterialSystem.cpp is now 486 lines total |
CreateCombatArena() / Initialize()
|
Game.cpp | 379 / 364 |
Game.cpp relocated to GameModules/SparkGameFPS/Source/Game/Game.cpp
|
| Various | GraphicsEngine.cpp | — |
GraphicsEngine.cpp is now a 13-line shim; platform code lives in GraphicsEngineWindows.cpp
|
The headline number ("66 oversized functions, 9 remaining, all annotated") was accurate at audit time. The codebase has since been refactored heavily enough that a fresh audit would need new line counts.
The original audit flagged 7 classes against a "10 max private helpers" guideline. The current CLAUDE.md guideline is ~15 public methods per class, framed as a "does each method earn its place?" question rather than a hard cap. Several of the worst offenders have been cut down:
| Class | File | Original count | Current (2026-06-08) |
|---|---|---|---|
| PostProcessingPipeline |
Graphics/PostProcessingPipeline.h (434 lines) |
84 | ~13 private methods — drastically reduced |
| PhysicsSystem |
Physics/PhysicsSystem.h (685 lines, relocated from Engine/Physics/) |
42 | Still data-heavy; not re-counted |
| RenderGraph |
Graphics/RenderGraph.h (1,125 lines, relocated from Graphics/RenderGraph/) |
26 | Still large |
| SimpleConsole |
Utils/SparkConsole.h (193 lines) |
42 | Reduced — header trimmed to 193 lines |
| PlatformInputManager, WaterSystem, BehaviorTree | various | 53 / 23 / 16+ | Not re-counted |
Note the relocations: PhysicsSystem.h moved from Engine/Physics/ to Source/Physics/, and RenderGraph.h moved from Graphics/RenderGraph/ to Source/Graphics/.
CLAUDE.md: PascalCase classes/methods, camelCase locals, m_ prefix members, UPPER_SNAKE macros.
Systematic across data-transfer (POD) structs. The m_ prefix is consistently used for class private members but generally omitted for public struct fields — a recognized gray area, since POD structs commonly omit m_. Affected headers historically included Input/InputBindings.h, Input/GamepadInput.h, Input/PlatformInput.h, Input/InputManager.h, Engine/Scripting/ScriptHotReload.h, Engine/Scripting/VisualScriptSystem.h, Engine/Procedural/SplatmapSystem.h, and Utils/SparkConsole.h.
Open question (unchanged): whether m_ applies to POD/data structs or only to private class members. Treated as low severity.
- Public methods are consistently PascalCase — no violations found.
- Macros are consistently UPPER_SNAKE; platform stubs like
_In_are acceptable.
CLAUDE.md: commented-out code → delete it. The original audit found only 2 minor instances (SeamlessAreaManager.cpp planned integration; SparkConsole.cpp incomplete state assignments). Both confirmed resolved — re-checking SeamlessAreaManager.cpp on 2026-06-08 finds no leftover commented integration block, and SparkConsole.cpp is fully trimmed.
CI also gates TODO/FIXME/HACK/XXX comment count at a threshold of 20 via the todo-count job.
| Violation type | Original count | Status 2026-06-08 |
|---|---|---|
| Functions over length guideline | 66 (9 remaining, annotated) | Annotations present; many cited files split/relocated |
| Duplicate functions in same file | 0 (all resolved) | Resolved |
| Classes with many private helpers | 7 | Reduced (PostProcessingPipeline 84→~13, SparkConsole trimmed) |
Struct m_ prefix |
~80+ fields | Open gray area, low severity |
| Commented-out code | 0 | Resolved |
-
Original entry date: 2026-04-02 (
.claude/knowledge/code-quality-violations.md, type: Observation, status: Mostly Resolved) - Verified against codebase 2026-06-08.
-
UPDATED — many cited files moved or shrank:
SparkEngine.cpp443 lines (entry implied ~1,660 in oversized functions);GraphicsEngine.cppis now a 13-line shim with platform code inGraphicsEngineWindows.cpp;MaterialSystem.cpp486 lines;SparkConsole.cpp641 /SparkConsole.h193.Game.cpprelocated toGameModules/SparkGameFPS/Source/Game/;PhysicsSystem.htoSource/Physics/;RenderGraph.htoSource/Graphics/. -
UPDATED — private-method counts:
PostProcessingPipeline.hdropped from 84 to ~13 private methods (now 434 lines). SimpleConsole/SparkConsole header trimmed. -
VERIFIED — STALE claims re-checked: commented-out code in
SeamlessAreaManager.cppis gone (resolved, as the entry claimed). The// NOTE: Intentionally exceeds ...annotations still exist (10 occurrences).EditorUI.cppremains genuinely large at 1,516 lines. - UNVERIFIABLE / not re-counted: PhysicsSystem, RenderGraph, PlatformInputManager, WaterSystem, BehaviorTree private-method counts and the per-file oversized-function totals were not re-tallied; treat the original numbers as historical.
- AI-Bloat-Pattern.md — why these violations accumulate and how the thresholds work
- Clang-Format.md — the formatting layer of code-quality enforcement
Published from 2b03dc797148. Edit the canonical source in wiki/.
- Documentation
- Docs route
- Wiki index
- Guides
- Tutorials
- Samples
- Examples
- API Reference
- API route
- Reference
- Build Guide
- Dependencies
- FAQ
- Changelog
- Roadmap
- Contributing
- Code of Conduct
- Home
- FAQ
- Getting Started
- Quick-Start Tutorial
- Making Your First Game
- Making Your First Multiplayer Game
- Artist Workflow Guide
- Editor Walkthrough
- Migration Guide
- How SparkEngine Works
- Architecture Overview
- Engine Architecture Flowchart
- Creating a Game Module
- Game Modules (catalog)
- Entity Component System
- Rendering and Graphics
- Physics
- Cloth Simulation
- Audio
- Input System
- Camera System
- Scripting with AngelScript
- Visual Scripting
- AI and Navigation
- Animation
- 2D Systems
- Networking
- Dedicated Server
- Multiplayer Quick Start
- Area Server Architecture
- Scene Management
- Large World Support
- Collaborative Editing
- Coroutine System
- Event System
- Event Response System
- Job System
- UI System
- UI Layout Extensions
- Localization
- Dialogue System
- Destruction System
- Replay System
- Achievement System
- Loading System
- Mod System
- Content Delivery
- Tween System
- Memory Integrity
- Gameplay Systems
- Terrain and Procedural Generation
- Save System
- Persistence System
- Day Night Cycle and Weather
- Cinematic Sequencer
- Runtime Prefabs
- SparkEditor
- Editor Tutorials
- SparkConsole
- SparkDaemon
- Shader Pipeline
- Asset Pipeline
- Asset Validation
- Asset Migration
- Game Packaging
- Online Services
- DataTable System
- Loot and Crafting System
- CSG System
- Font System
- Timer Manager
- Movie Render Pipeline
- HLOD and World Partition
- Remote Debug System
- Selection Manager
- Asset Dependency Graph
- Editor Automation
- File Watcher
- Project Templates
- System Requirements
- VR Support
- Mobile Platform
- Accessibility
- Platform Input
- Platform Certification
- Cross-Compilation: Wine Testing
- RHI Abstraction Layer
- D3D11 Backend
- D3D12 Backend
- Vulkan Backend
- OpenGL Backend
- Metal Backend
- DXR Raytracing
- Hybrid Ray Tracing
- Upscaling (DLSS/FSR)
- Render Graph
- Shader Graph
- GPU Particles
- GPU-Driven Rendering
- Volumetric Fog
- Volumetric Clouds
- Global Illumination
- Virtual Texturing
- Water Rendering
- Clustered Lighting
- Material System
- Post-Processing
- Shadow System
- Particle System
- Decal System
- Sky and Atmosphere
- Foliage System
- Mesh Shaders
- Neural Rendering
- Configuration Reference
- Performance Tips
- Benchmark Framework
- Threading Model
- Fuzz Policy and Parser Security
- Memory Safety
- Memory Management Patterns
- Build System and CMake Modules
- Profiler and Debugging
- Performance Profiling Guide
- Telemetry System
- Crash Reporting
- Golden Image Testing
- Utilities
- Testing
- Fuzz Policy and Parser Security
- Codebase Statistics
- Codebase Health
- Error Handling Patterns
- Hot Reload Overview
- Troubleshooting
- Contributing
- Workflow Patterns
- Build Optimizations
- CI Reproducible Builds
- GitHub API and PR Checks
- Git Rebase Conflicts
- Clang-Format
- Code Quality Violations
- AI Bloat Pattern
- MinGW + Wine Cross-Compilation
- Live Editor Testing
- Engine & Renderer Landscape
- DuetOS Portability Catalog
- Five-Engine Analysis
- Eleven-Engine Analysis
- ThorVG / Unity Graphics Analysis
- Advanced Techniques Catalog
- Third-Party Library Evaluation
- Engine Viability Evaluation
- Engine Feature Recommendations
- Project Recommendations
- Mac Compatibility Analysis
- Codebase Observations
- Codebase Bloat Audit
- Test Suite Audit
- Documentation Coverage Audit
- ThirdParty Dependencies Audit
- Load Test Baseline
- Gameplay Systems Status
- SparkGame Module Status
- Stub and Abandoned Features
- Memory Integrity System
- Memory Safety Evaluation
- Hardware Acceleration Systems
- Jolt Physics Integration
- GPU/CPU Separation Plan
- Daemon Services Architecture
- Reflection & Polymorphism Refactoring Plan
- SparkBuild In-Tree
- Wine No-JobSystem Breakthrough
- Wine Role and Fallback Tiers