Skip to content

collect-license-metadata should ignore untracked files #148046

@jyn514

Description

@jyn514

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 #147448 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-licensingArea: Compiler licensingC-bugCategory: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions