tabcount
Count tabs in files
Count tab characters in files and directories. Quick diagnostic for tab/space consistency issues before editing.
Features
- Count tabs in single files or entire directories
- Report per-file tab counts
- Quick diagnostic before using notab
Install
go install github.com/hegner123/tabcount@latestThe Problem: Is this file using tabs or spaces?
# Before editing, you need to know if a file has tabs.
# cat -A shows every character - too verbose.
# You just need a count.Solution
$ tabcount --cli --dir ./src --ext .goOutput
{"files":[{"path":"src/main.go","tabs":142},{"path":"src/server.go","tabs":98},{"path":"src/config.go","tabs":0}],"total_tabs":240,"files_with_tabs":2,"files_without_tabs":1}Comparison
| Metric | Value |
|---|---|
| Diagnostic for | notab (convert tabs before editing) |
| Scope | Single file or directory scan |