Closed nkh closed 1 year ago
I get your point; the challenge is displaying the information cleanly in a terminal because the lines become excessively long. You can get by file + by language information in CSV, SQL, YAML, XML, and JSON formats. Try, for example,
cloc --by-file --csv
From the standard file formats one can write utilities to display the information in any desired manner. The SQL option makes it easy to write cloc's results to an SQLite database. Then you can use sqlite_formatter
(included with cloc) for nicely formatted output, ref. https://github.com/AlDanial/cloc#sql-
Since there are many ways to produce the by file + language results I do not plan to change the basic text output.
--by-file doesn't say what language the files have
--by-file-by-lan generates two report
two option could make the report more useful to me and hopefully many more
--by-file-show-lang which would add a column with the language, or an abreviation of it
--by-lang-and-file where the files are listed within a language section