12namespace portals::compactness {
30 std::vector<std::filesystem::path>
paths;
36 std::vector<std::filesystem::path>
before;
37 std::vector<std::filesystem::path>
after;
46Metrics measureSource(std::string_view source);
52Footprint measureFiles(std::span<const std::filesystem::path> paths);
58Options parseArguments(std::span<const std::string_view> arguments);
66std::string renderReport(
const Footprint &before,
const Footprint &after, std::string_view format);
71std::string_view helpText();
Definition compactness.hpp:15
std::uint64_t codeLines
Physical lines intersecting token spelling.
Definition compactness.hpp:19
std::uint64_t lexicalTokensApprox
Approximate preprocessing tokens, including directives.
Definition compactness.hpp:18
std::uint64_t commentBytes
Normalized source spelling bytes occupied by comments.
Definition compactness.hpp:22
std::uint64_t maxBraceNesting
Maximum lexical brace depth outside directives, per file.
Definition compactness.hpp:25
std::uint64_t files
Number of canonical, distinct input paths.
Definition compactness.hpp:16
std::uint64_t preprocessorDirectives
Directives introduced at logical line start.
Definition compactness.hpp:20
std::uint64_t maxLineBytes
Maximum physical line length in UTF-8 bytes, excluding BOM/newline.
Definition compactness.hpp:24
std::uint64_t stringLiteralBytes
Normalized string spelling bytes including prefix and suffix.
Definition compactness.hpp:23
std::uint64_t sourceBytes
Original file bytes, including BOM and newlines.
Definition compactness.hpp:17
std::uint64_t preprocessorTokens
Tokens belonging to directives, including the introducer.
Definition compactness.hpp:21
Definition compactness.hpp:35
std::string format
Either json or markdown.
Definition compactness.hpp:38
std::vector< std::filesystem::path > after
Explicit candidate files.
Definition compactness.hpp:37
std::vector< std::filesystem::path > before
Explicit baseline files.
Definition compactness.hpp:36
bool help
Print usage without measurement.
Definition compactness.hpp:39