Skip to content

star lint go-style --fix corrupts the SPDX header on every file it rewrites, and writes TODO placeholders instead of doc comments #994

Open

Description

@David-Noble-at-work

star lint go-style --fix corrupts the license header of every file it rewrites, and fills the tree with
placeholders instead of documentation. It cannot be run over this repository in its current state.

1. It merges the two-line SPDX block into one line

Reproduced 2026-09-30 on pkg/sops/detect.go (source) and pkg/sops/locate_test.go (test), copied to a scratch
directory so the repository was not touched:

before
// SPDX-License-Identifier: Apache-2.0
// Copyright Noble Factor. All rights reserved.

after --fix
// SPDX-License-Identifier: Apache-2.0 Copyright Noble Factor. All rights reserved.

The SPDX identifier is now the string Apache-2.0 Copyright Noble Factor. All rights reserved. rather than
Apache-2.0. Every SPDX consumer reads that line, and 848 files are in scope for the go-style sweep, so a
single --fix run over the tree rewrites 848 license headers into invalid ones.

Whether star lint copyright catches it is untested — testing it requires a corrupted file inside the
repository, and I would not dirty the tree to find out. lint.copyright.enabled is true in
star/config.yaml and the linter does run over 984 files, so it is the natural place for a regression test
either way.

2. It writes TODO(go-style): add summary instead of a doc comment

The same run turned 9 violations into 2. The 7 it "fixed" now read:

// TestLocate_NearestInTree TODO(go-style): add summary
func TestLocate_NearestInTree(t *testing.T) {

That satisfies the linter's comment.present check while documenting nothing. Over the current debt it would
silence 2,057 missing doc comments with filler and report the tree clean. A gate that can be satisfied by a
placeholder is not a gate, and the placeholders are then invisible to the linter that would otherwise have
asked for them.

If --fix cannot write a real summary it should leave the violation standing, not emit a TODO.

3. It still does not emit Parameters: sections

The two violations left after --fix were both missing Parameters section, on writeLocateFixture and
assertChain. That is #938, the unfinished styler
port, and it is the one part of this already tracked.

Why this blocks the sweep

devlore-cli#964's remaining go-style debt is 3,859 violations: 1,802 Parameters/Returns and 2,057 doc
comments. The plan assumed --fix would clear the 1,802 mechanically once #938 landed. As it stands --fix
would instead corrupt 848 license headers and paper over the 2,057, so the sweep must be done without it until
this is fixed.

Evidence of completion

Related documents

Document What it is
devlore-cli#964 The go-style sweep this blocks; 3,859 violations remain
devlore-cli#938 The unfinished styler port; item 3 above is already its scope
docs/plans/fix/964-ci-lints-neither-markdown.md Phase 4c, which assumed --fix would clear the mechanical half
go-style-guidelines.md The rules --fix is meant to enforce

Activity

  1. David-Noble-at-work commented on Nov 9, 2026

    @David-Noble-at-work
    ContributorAuthor

    star github triage sweep added this issue to Triage: devlore, for the rule it breaks:

    • severity: a Bug whose Severity is blank; a bug is Critical, High, Medium or Low
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

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions