Add HTML output support with collapsible hierarchical directory
structure, color-coded metrics, and build info in the header.
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Raw line counts can be hard to read for large codebases. Add a --kloc
(-k) option to display line counts in kilolines format for a more
compact view.
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
When showing files within directories (dirs -fs), there is no visual
separation between one directory's files and the next directory. Add
a blank line after each file list to improve readability.
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
File percentages show one decimal place while directory percentages
show whole numbers. Display file %Code as whole numbers to match the
directory format for cleaner, more consistent output.
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
File metrics do not align with directory columns, making it hard to
compare them visually. Align file output with directory columns by:
- Skipping the Files, Used, and %Used columns (leave empty)
- Showing percentage active in the %Code column
- Showing total lines (in kLOC) in the kLOC column
- Showing active lines (in kLOC) in the Used column
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Files appear in arbitrary order, making it hard to find specific
files. Sort them alphabetically by filename for easier navigation.
Also remove the inactive lines column from file output to reduce
clutter, keeping only: filename, total lines, active lines, and
percentage active.
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Files with 0 active lines clutter the output when viewing directories
with 'dirs -fs'. Hide them by default, matching the directory display
behavior. Use the -e flag (dirs -fse) to show them.
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Add a new tool called 'codman' (code manager) for analysing source code
usage in U-Boot builds. This tool determines which files and lines of
code are actually compiled based on the build configuration.
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>