defineGleamPolicy
defineGleamPolicy<
C>(args):PolicyShape<C>
Defined in: policyDefiners/defineGleamPolicy.ts:98
Define a repo policy for gleam.toml files.
Type Parameters
Section titled “Type Parameters”C = undefined
Parameters
Section titled “Parameters”Policy metadata, parsed-TOML handler, and optional defaults.
Returns
Section titled “Returns”PolicyShape<C>
A file policy that reads and parses matching gleam.toml files.
Remarks
Section titled “Remarks”This is a helper function that creates a policy pre-configured to match gleam.toml files. The handler receives the parsed TOML content.
Example
Section titled “Example”const MyGleamPolicy = defineGleamPolicy({ name: "MyGleamPolicy", description: "Ensures gleam.toml has required fields", handler: async (toml, { file }) => { if (!toml.name) { return { error: "Missing name field", fixable: false }; } return true; },});