macro_rules! count_some {
() => { ... };
(workspace: true) => { ... };
(workspace: false) => { ... };
($other:tt) => { ... };
}Expand description
Executes a selective line count using CountRoo with the default configuration. ππ
This macro simplifies the process of counting lines of code for certain types within your
project using a predefined set of file extensions. Itβs like sending CountRoo on a
specific mission with a map and a checklist, ensuring it focuses on the files that matter
most to you.
Under the hood, it creates a new CountRoo instance with default settings, initiates the
counting process for specified file types, and then attempts to export the results to stdout.
Itβs a quick and easy way to get insights without getting bogged down in configuration details.
Β§Requirements
- The
defaultfeature must be enabled for this macro to be available. CountRoo,Config, and a suitableOutputWriter(likeStdoutWriter) must be defined and available in your project.
Β§Example Usage
Simply invoke the macro in your code where you need to perform the count:
// Inside build.rs
use countroo::prelude::*;
fn main() {
count_some!();
// If you're using it for a workspace, you can just use it like this inside any project's build.rs
countroo::count_some!(workspace: true);
}This macro is perfect for quick checks or when integrating CountRoo into larger workflows
where you want a hassle-free setup. Just call count_some! and let CountRoo handle the rest,
delivering a concise report directly to your console. π¨οΈβ¨