Documentation
¶
Overview ¶
Package validation provides utilities for validating generated Go code quality.
This package tests complete DynamoDB code generation templates for:
- Format compliance (go fmt, goimports, gofumpt)
- Compilation validation
- Template rendering correctness
Index ¶
Constants ¶
const EXAMPLES = "../fixtures"
EXAMPLES define a path to JSON-schemas examples which will use for tests.
Variables ¶
This section is empty.
Functions ¶
func AllFormattersUnchanged ¶
AllFormattersUnchanged checks that Go formatters (go fmt, goimports, gofumpt) don't modify the provided code. This validates that the code is already properly formatted according to Go standards. Example: AllFormattersUnchanged(t, "package main\n\nfunc main() {}\n")
func CodeCompiles ¶
CodeCompiles checks that the provided Go code compiles successfully and passes go vet. Creates a temporary module with required dependencies and attempts compilation. Example: CodeCompiles(t, generatedCode, "mypackage")
Types ¶
type ExecResult ¶
ExecResult contains the result of executing a command with stdout, stderr and error information.