Macro countroo::count_some

source ·
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 default feature must be enabled for this macro to be available.
  • CountRoo, Config, and a suitable OutputWriter (like StdoutWriter) 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. 🖨️✨