Uh oh!
There was an error while loading. Please reload this page.
Drop the REUSE.toml annotation that duplicates LibCodeGen.sol's own header - #130
Conversation
src/lib/LibCodeGen.sol heads itself with SPDX-FileCopyrightText and a licence identifier, the same as every other file under src/lib, and was additionally listed among the REUSE.toml paths that cannot carry a header. The header is the copy that travels with the file into a published package, so the annotation is the copy that goes. test/lint/ReuseAnnotations.t.sol holds the property that made the entry redundant: no path REUSE.toml annotates resolves to a file that licenses itself. Recursive globs are expanded to the files below them, an unresolvable glob form is refused rather than passed unchecked, and a tag inside a REUSE-IgnoreStart region is not read as licensing information. The suite reads the paths REUSE.toml names, which is the whole project, so fs_permissions grants a project wide read that subsumes the foundry.toml entry. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
# Conflicts: # foundry.toml
Warning Review limit reached
Next review available in:1 minute Limit details: You’ve used all 1 included review currently available under your plan. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The lint is rehomed to rainlanguage/rainix#317. `foundry.toml` returns to `main`'s three-entry `fs_permissions` block, including the `{ access = "read", path = "foundry.toml" }` line the lint's grant replaced. The `REUSE.toml` deletion this PR exists for is unchanged and is now unguarded by any test in this repo. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Uh oh!
There was an error while loading. Please reload this page.
Closes#85
src/lib/LibCodeGen.solheads itself with the same two SPDX lines every otherfile under
src/libcarries, and was also listed among theREUSE.tomlpathsthat cannot carry a header.
reuse lintis satisfied by either copy, so theannotation was a second statement of the same fact, held in a different file
from the one it describes and free to drift from it. The header is the copy
that travels with the file into a published package, so the annotation is the
copy that goes — which is what the issue proposed.
The whole diff against
mainis now that one deleted line.Nothing guards this — it can regress silently
This change can regress silently, and no test in this repo guards it.
Putting
src/lib/LibCodeGen.sol— or any other self-heading file — back intoREUSE.toml's annotated path list tomorrow reds nothing:reuse lintinrainix / legalpasses with the annotation and passes without it, which isexactly why the duplication was invisible in the first place. The property that
would catch it — no path
REUSE.tomlannotates resolves to a file that licensesitself — is a repo-wide static check, and its home is
rainlanguage/rainix#317, not a Solidity test in this
repo.
That check was previously carried here as
test/lint/ReuseAnnotations.t.sol(264 lines). It is deleted, along with the
{ access = "read", path = "." }grant it needed.
foundry.tomlis back tomain's three-entryfs_permissionsblock byte for byte, including the
{ access = "read", path = "foundry.toml" }line the repo-root grant had replaced. 8 of its 9 test functions asserted on its
own path-resolution and SPDX-scanning helpers rather than on anything in
src/,and
reuse lintpassed either way.Why it was there in the first place
The fixer brief driving this fleet of PRs said "every fix ships a test,
verify-by-hand is never acceptable", with no exemption for changes that have no
behaviour. That was wrong and is corrected. It produced hand-rolled static
analysis in Solidity across nine PRs, this one among them.
QA
origin/main(b422d97) is merged into thisbranch — merged, not rebased, and not force-pushed.
nix develop -c forge test:Ran 18 test suites in 2.13s (19.87s CPU time): 142 tests passed, 0 failed, 0 skipped (142 total tests).19 test suites … 151 tests passed, 0 failed, 0 skipped. 151 − 142 = 9,exactly the nine
test*functions of the deleted file, and one suite.nix develop -c forge fmt --check: clean, exit 0.nix develop -c reuse lint(whatrainix / legalruns), on this branch:Invalid SPDX License Expressions: 0,Files with copyright information: 49 / 49,Files with license information: 49 / 49, compliant with REUSE 3.3.Compliance therefore does not depend on the deleted annotation.
Not touched
REUSE.toml's.gas-snapshotline andfoundry.toml'soptimizer comment block. Neither line is touched here.
Review rate limitedon this repo's recent PRs. If it doesso here, that check being green is an absence of review, not a passed one.