Function create [src]
Prototype
pub fn create(owner: *std.Build, options: Options) *Fmt
Parameters
owner: *std.Build
options: Options
Source
pub fn create(owner: *std.Build, options: Options) *Fmt {
const fmt = owner.allocator.create(Fmt) catch @panic("OOM");
const name = if (options.check) "zig fmt --check" else "zig fmt";
fmt.* = .{
.step = Step.init(.{
.id = base_id,
.name = name,
.owner = owner,
.makeFn = make,
}),
.paths = owner.dupeStrings(options.paths),
.exclude_paths = owner.dupeStrings(options.exclude_paths),
.check = options.check,
};
return fmt;
}