AB.StructValidator (AB v0.2.1)

View Source

Validates consistency between struct type definitions and function typespecs.

This module catches inconsistencies where @type definitions don't match @spec definitions, ensuring that generated structs work correctly with the functions that are supposed to accept them.

Summary

Functions

Validates struct type consistency for a module.

Validates consistency between @type field definitions and @spec field definitions.

Functions

run_struct_consistency_validation(module)

@spec run_struct_consistency_validation(module()) :: :ok

Validates struct type consistency for a module.

Checks if @type definitions are consistent with @spec definitions.

validate_struct_field_consistency(module, function_name, type_field_types)

@spec validate_struct_field_consistency(module(), atom(), [any()]) :: :ok

Validates consistency between @type field definitions and @spec field definitions.