Skip to content

Carry a copyright line and an SPDX license identifier in every source file #1546

Closed

Description

@jmrplens

No source file carries a copyright line or a license identifier: none of the roughly 3,185 tracked .go files and none of the roughly 141 shell, Python, JavaScript, TypeScript, Astro, CSS, PowerShell and Ruby files. LICENSE says "Copyright (c) 2026 Jose Manuel Requena Plens". The OpenSSF Best Practices gold criteria copyright_per_file and license_per_file ask for both in every source file, and suggest "Copyright the [project name] contributors." with an SPDX identifier.

Change

  • The holder is the maintainer's decision: "Copyright the gitlab-mcp-server contributors." (with LICENSE naming the contributors too) or the maintainer's name.
  • Two comment lines near the top of every source file, the copyright line and SPDX-License-Identifier: MIT: every .go file, testdata included, and .sh, .py, .mjs, .js, .ts, .astro, .css, .ps1, .rb, Dockerfile and Makefile. Data and prose (JSON, YAML data, Markdown, MDX) are not source.
  • Placement: separated from the package clause by a blank line so go/doc does not read it as the package comment (go run ./cmd/godoc_tool/ audit stays clean); after the shebang in scripts; inside the frontmatter in .astro; Code generated ... DO NOT EDIT. kept intact.
  • The generators that write source emit the header (cmd/gen_action_catalog_manifest, cmd/gen_action_grants, cmd/gen_brand and any other), and the templates that create files (the create-mcp-tool skill) carry it.
  • A gate in Go over internal/sourcewalk, with a fix mode, run by make analyze and CI; CLAUDE.md gets the rule and a link.
  • Tests that assert file:line positions in testdata are updated for the shifted lines.

The change touches every source file, so it is produced by the gate's fix mode and regenerated on the current main right before it merges, when no other stack is open, rather than rebased.

Done when

  • The gate passes on the tree and fails on a planted file without the header.
  • go build ./..., go test ./..., golangci-lint, the Go doc audit, every generator's -check and the site gates pass.

Activity

  1. added this to the 3.4.0 milestone on Oct 27, 2026
  2. added
    toolingThe audit and generator commands under cmd/, and the Makefile targets that run them
    on Oct 27, 2026
  3. jmrplens commented on Oct 29, 2026

    @jmrplens
    OwnerAuthor

    Done in #1563: every source file now opens with Copyright (c) 2026 José M. Requena Plens and SPDX-License-Identifier: MIT, the three generators that write Go and the create-mcp-tool templates write it too, and make check-file-headers holds the tree to it in make analyze and CI. The gate reads the files git lists rather than walking internal/sourcewalk, for the reasons given in #1563. The other file templates that still show a new Go file without the header, and the two Python modules the PyPI wheel builder writes, are carried by #1591.

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

    toolingThe audit and generator commands under cmd/, and the Makefile targets that run themv3.4.0

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions