Skip to content

devlore-inventory generator strips the Apache SPDX header on every regeneration #396

Closed

Description

@David-Noble-at-work

The relicense (#389) added Apache-2.0 SPDX headers to pkg/op/inventory/inventory.gen.go and cmd/star/inventory/inventory.gen.go, but cmd/devlore-inventory does not emit a header — and make generate runs it under every build and test (Makefile:477-478). Any make build/make test therefore rewrites both files headerless, and the next commit that stages them silently undoes the relicense on those two files. Observed in practice minutes after #389 merged: a routine local build left both files modified with exactly the header lines deleted.

Same defect class as the defaultGolangciConfig template #389 already fixed — a generator whose output must carry the header, emitting it from the template rather than relying on a one-time sweep. Fix shape: cmd/devlore-inventory writes the SPDX + copyright lines at the top of its output (matching star lint copyright's expectation so license: auto stays consistent). The two committed files need no separate fix — the first regeneration after the generator change produces them correctly.

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

Metadata

Metadata

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