Skip to content

generate-types emits an extra blank line at EOF #5

Description

@eas4ai

suprnova generate-types in v2.0.0 emits two trailing newlines. Projects enforcing Git whitespace checks then fail with new blank line at EOF.

Reproduced with a CLI rebuilt from the exact released commit 3229aa9af542c991196274fa3c235cdce88a68e2:

  1. Create a disposable project with a minimal Cargo.toml and src/lib.rs containing:
#[derive(InertiaProps)]
pub struct AuditProps {
    pub title: String,
}
  1. Run suprnova generate-types.
  2. Run git diff --no-index --check /dev/null frontend/src/types/inertia-props.ts.

Generation exits 0 and emits AuditProps. The generated file ends in two newline bytes; the whitespace check exits 3 and reports new blank line at EOF.

Expected: generated output ends with one newline and passes the whitespace check. Preserve intentional blank lines between declarations.

The separately fixed generate-types --help behavior is working in this release; this issue concerns normal generation.

Source: https://github.com/eas4ai/suprnova/blob/3229aa9af542c991196274fa3c235cdce88a68e2/suprnova-cli/src/commands/generate_types.rs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions