Skip to main content

Crate hawkeye

Crate hawkeye 

Source
Expand description

Check, format, and remove source-file license headers.

Load a Config, build an Engine, and run the desired operation:

use hawkeye::Config;
use hawkeye::Engine;
use hawkeye::Scope;

let config = Config::load("licenserc.toml")?;
let report = Engine::new(config)?.check(Scope::All)?;
println!("checked {} files", report.files.len());

The default application feature builds the hawkeye executable. Library-only users can disable default features to omit its command-specific dependencies.

Structs§

Config
Configuration for a HawkEye engine.
Edits
Pending file edits prepared by an Engine.
Engine
A license-header processor built from one Config.
Error
An error returned by a HawkEye operation.
FileReport
The outcome for one selected file.
FilesConfig
File discovery settings.
GitConfig
Git integration settings.
HeaderConfig
Header template and recognition settings.
Report
The outcomes of an Engine operation.
RuleConfig
File selectors and the comment styles used for matching and output.

Enums§

ErrorKind
A category of HawkEye errors.
FeatureMode
Availability policy for a Git-backed feature.
FileOutcome
The outcome of an operation for one selected file.
Scope
The files and directories processed by an Engine operation.
StyleConfig
A custom comment style.