forehead-core
Core library for forehead — a tool for creating and maintaining file headers for code license.
Usage
use ;
let config = from_path?;
let forehead = new;
// Apply headers
let report = forehead.apply?;
// Check headers (CI mode)
let report = forehead.check?;
if !report.is_clean
// Remove headers
let report = forehead.remove?;
Features
- Configurable header detection with built-in and custom indicators
- Support for 30+ file types with correct comment style detection
- Template placeholders:
{project},{author},{year},{year_span},{license},{repository},{description},{file} - Optional greetings line prepended to every header
- Headless detection, apply, check, and remove operations
License
Apache-2.0 OR MIT