rust-lang / rust-lang/rust

collect-license-metadata should ignore untracked files

Open
#148,046 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-licensing C-bug T-bootstrap
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

An untracked file is almost certainly just garbage lying around from e.g. test output and shouldn't be included in the license report.
Here's an example that went wrong:

diff --git a/license-metadata.json b/license-metadata.json
index df38c560a69..db757dd7592 100644
--- a/license-metadata.json
+++ b/license-metadata.json
@@ -474,6 +474,24 @@
             "name": "TRADEMARK.md",
             "type": "file"
           },
+          {
+            "directories": [],
+            "files": [
+              "all-covered-functions.txt",
+              "diff-backports.sh",
+              "expected-functions.txt",
+              "function-diff.txt",
+              "merged.profdata",
+              "missing-functions.txt"
+            ],
+            "license": {
+              "copyright": [
+                "NONE"
+              ],
+              "spdx": "NONE"
+            },
+            "type": "group"
+          },
           {
             "license": {
               "copyright": [

cc https://github.com/rust-lang/rust/pull/147448#issuecomment-3377642607

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the collect-license-metadata entry point and inspect how it discovers files for license-metadata.json. Reproduce the example with an untracked file, then verify that generated license metadata excludes it while continuing to include tracked files.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.