{"enrichment":{"faq":[{"a":"cloc scans your C# project and reports line counts by language, including code, comments, and blank lines. Run `cloc .` in your solution root to generate a summary table. cloc identifies .NET file types automatically and produces repeatable statistics suitable for tracking codebase size over time or across branches.","q":"How do I count lines of code in my C# project with cloc?"},{"a":"Yes. cloc supports branch-diff analysis through `cloc --git-diff-main` or by comparing two refs directly. This lets you measure code deltas between branches or releases, showing which languages grew and by how much. Branch comparisons are useful for sizing decisions and understanding code composition shifts across development cycles.","q":"Can cloc compare code size and composition between Git branches?"},{"a":"cloc breaks down your .NET codebase by language\u2014C#, XAML, JSON, XML, and others\u2014reporting lines of code, comments, and blanks for each. This composition view helps you understand solution footprint and identify dominant languages, making it easier to assess codebase complexity and plan maintenance or refactoring efforts.","q":"What is cloc's language mix analysis for .NET solutions?"},{"a":"cloc outputs JSON, CSV, and plain text formats via command-line flags like `--json` and `--csv`. Pipe output to files in your CI job, then archive or publish results. This enables automated code statistics collection across builds, letting you track metrics over time and detect unexpected code growth or composition changes.","q":"How do I integrate cloc into my CI pipeline for automated reporting?"},{"a":"cloc respects `.gitignore` rules and excludes common build artifacts by default, including bin and obj folders. You can also use `--exclude-dir` to skip specific directories. This ensures your line counts reflect source code only, not compiled or generated output, for accurate footprint measurement.","q":"Can cloc exclude bin and obj directories from .NET line counts?"},{"a":"cloc delivers repeatable line-count, language composition, and branch-diff statistics for .NET codebases. Use it to measure solution footprint, compare code deltas, and track codebase composition. Do not use cloc to assess developer productivity or replace design review\u2014line counts alone do not reflect code quality or effort.","q":"What does cloc measure and what should it not be used for?"}],"shadow_tags":["code-metrics","repository-analysis","codebase-sizing","branch-comparison","dotnet-tooling","ci-integration","language-breakdown","refactoring-baseline","project-footprint","automated-reporting"],"summary_rewrite":"cloc delivers line-count, language composition, and branch-diff statistics for .NET codebases through repeatable, configurable commands. Use it to measure solution footprint, compare code deltas across refs, and track codebase composition\u2014not to assess developer productivity or replace design review."},"files":[{"bytes":6156,"path":"catalog/Tools/cloc/skills/cloc/SKILL.md","sha256":"77738bd869f39f741d81d96270d834220db72c37f57197c42489a0bef422ce6c","url":"https://skillfed.io/files/managedcode/dotnet-skills/cloc/d22a644d/SKILL.md"}],"id":"managedcode/dotnet-skills/cloc","links":{"html":"https://skillfed.io/managedcode/dotnet-skills/cloc","md":"https://skillfed.io/managedcode/dotnet-skills/cloc.md","repo":"https://github.com/managedcode/dotnet-skills"},"meta":{"agents_supported":[],"first_seen":"2026-07-28","forks":35,"language":"C#","last_updated":"2026-07-25","license":"MIT","name":"cloc","publisher":"managedcode","stars":463},"relations":{"similar":[{"id":"managedcode/dotnet-skills/codeql"},{"id":"managedcode/dotnet-skills/archunitnet"},{"id":"managedcode/dotnet-skills/reportgenerator"},{"id":"managedcode/dotnet-skills/csharpier"},{"id":"managedcode/dotnet-skills/format"},{"id":"managedcode/dotnet-skills/netarchtest"},{"id":"managedcode/dotnet-skills/meziantou-analyzer"},{"id":"managedcode/dotnet-skills/coverlet"},{"id":"managedcode/dotnet-skills/complexity"},{"id":"managedcode/dotnet-skills/analyzer-config"}]},"slug":{"owner":"managedcode","repo":"dotnet-skills","skill":"cloc"},"version":"d22a644d"}
