collect-license-metadata should ignore untracked files
Open
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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