defineGleamPolicy
Call Signature
Section titled “Call Signature”defineGleamPolicy<
C>(args):FilePolicyDefinition<C> &object
Defined in: policyDefiners/defineGleamPolicy.ts:102
Define a repo policy for gleam.toml files.
Type Parameters
Section titled “Type Parameters”C = void
Parameters
Section titled “Parameters”DefineGleamPolicyArgs<C> & object
Policy metadata, parsed-TOML handler, and optional defaults.
Returns
Section titled “Returns”FilePolicyDefinition<C> & object
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 [{ message: "Missing name field" }]; } return []; },});Call Signature
Section titled “Call Signature”defineGleamPolicy<
C>(args):FilePolicyDefinition<C> &object
Defined in: policyDefiners/defineGleamPolicy.ts:106
Define a Gleam policy that requires explicit configuration.
Type Parameters
Section titled “Type Parameters”C = void
Parameters
Section titled “Parameters”DefineGleamPolicyArgs<C> & object
Returns
Section titled “Returns”FilePolicyDefinition<C> & object
Call Signature
Section titled “Call Signature”defineGleamPolicy<
C>(args):FilePolicyDefinition<C>
Defined in: policyDefiners/defineGleamPolicy.ts:110
Define a Gleam policy with optional configuration.
Type Parameters
Section titled “Type Parameters”C = void