lint: check copyright headers

bitcoin/bitcoin: PR #36967

Review failed during source verification.

Earlier concerns neither republished nor resolved: 1 minor finding. See the Run archive for their assessments.

Coverage details

Background

Ralph's summary of historical context for the behaviour affected by this change. The historical record reviewed here is incomplete.

Documented decisions

The referenced #34106 comment proposed making header additions mechanically enforceable: maflcko wrote, “Seems fine to add, but if we want to add those, maybe there should be a linter for this?” Its visible implementation looked for a copyright line ending in “Bitcoin Core developers,” followed by the MIT distribution notice and a COPYING/HTTP reference. It did not explicitly require the preceding word “The.”

This directly establishes the proposed enforcement intent and header structure. It supports collective attribution, but does not by itself establish the current linter’s stricter requirement that the line end in “The Bitcoin Core developers.” The suggestion was conditional, not an inspected resolution adopting every detail.

Source 1

An earlier copyright discussion distinguished files by origin: roques described Bitcoin-origin files under src/ as carrying “Copyright (c) The Bitcoin Core developers,” while files originating in external projects retained those projects’ authors’ copyright headers. The same comment identified Satoshi as an exception and noted that several files outside src/, especially contrib/devtools/, retained their initial authors’ notices.

This supplies a historical basis for preserving external attribution rather than rewriting every file into the collective format. The stated distinction is provenance, not merely the presence of an individual’s name. The qualifications also mean this observation cannot establish a universal exemption rule or validate the current path list.

Source 1

The earlier discussion included concern that adopting the collective header might mean assigning copyright to somebody else. Roques explicitly said that this had been a misunderstanding, endorsed another participant’s interpretation, and requested an explanation in developer documentation.

This records an important distinction behind collective attribution: at least this participant understood it as compatible with contributors retaining copyright, rather than as copyright assignment. The inspected passage does not contain the underlying interpretation or a legal explanation, so its authority is limited to that participant’s stated understanding.

Source 1

Ralph's inferences

The pinned change operationalizes two separate choices: a standard collective-attribution check for selected source and script files, and path-based exemptions labeled “External copyright.” The historical origin-based distinction plausibly explains the exemptions’ purpose, but the inspected evidence does not derive their exact membership or require exempting every file with an external notice.

The base lint_docs.rs lacks this copyright check; the head requires the exact collective suffix and bypasses the listed external-copyright paths. The historical rationale therefore explains the policy direction without establishing all of the newly enforced boundaries.

Source 1