Skip to content

feat: add code complexity statistics; reorganize CLI/Core folders - #49

Merged
coldhighsun merged 1 commit into
mainfrom
feature/complexity-stats
Sep 11, 2026
Merged

feat: add code complexity statistics; reorganize CLI/Core folders#49
coldhighsun merged 1 commit into
mainfrom
feature/complexity-stats

Conversation

@coldhighsun

Copy link
Copy Markdown
Owner

Summary

  • Adds a simplified cyclomatic-complexity metric: per-file branch-keyword count (1 + if/for/while/&&/... occurrences), aggregated to a per-language total/average, covering 13 mainstream C-style languages (C#, Java, JS, TS, Python, Go, Rust, C, C++, Kotlin, Swift, PHP, Ruby). Unsupported languages report null/N/A.
  • New --no-complexity CLI flag; Complexity column/field added to all five output formats (Table, Csv, Json, Markdown, Html).
  • Reorganizes Sloc.Cli's flat root files into Analysis/, Parsing/, Updates/ (namespaces Sloc.Cli.Analysis/.Parsing/.Updates), and Sloc.Core's scanning pipeline into Scanning/ (Sloc.Core.Scanning) — matching the existing Output/ folder-namespace convention. Pure moves, no behavior change.

Test plan

  • dotnet build Sloc.slnx (Debug & Release) — 0 warnings, 0 errors
  • dotnet test Sloc.slnx — 329/329 passing
  • Manually verified Table/--by-file/--no-complexity/JSON output against the repo's own source tree

…to folders

Adds a simplified cyclomatic-complexity metric (branch-keyword count per file,
aggregated per language) covering 13 mainstream C-style languages, exposed via
--no-complexity and a Complexity column/field in all five output formats.

Also splits AnalyzeHandler.cs's mixed types into Sloc.Cli/{Analysis,Parsing,Updates}
and moves Sloc.Core's scanning pipeline into Sloc.Core/Scanning, matching the
existing Output/-folder namespace convention.
@coldhighsun
coldhighsun merged commit 00ff6af into main Sep 11, 2026
9 checks passed
@coldhighsun
coldhighsun deleted the feature/complexity-stats branch September 11, 2026 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant