Skip to content

fix: route diagnostic output to stderr in generator #56

Description

@pageton

Summary

The generator prints diagnostic messages to stdout via fmt.Printf:

// internal/gen/generator.go:212
fmt.Printf("Generating file %s from %s...\n", outPath, file.inputPath)

// internal/gen/generator.go:236
fmt.Printf("Skipping generated file: %s\n", inputFile)

These are log/diagnostic messages, not program output. They should go to stderr so they don't corrupt piped output when the CLI is used in scripts or CI pipelines.

Fix

fmt.Fprintf(os.Stderr, "Generating file %s from %s...\n", outPath, file.inputPath)
fmt.Fprintf(os.Stderr, "Skipping generated file: %s\n", inputFile)

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions