Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Inconsistencies wrt relative paths in `referenced_filenames`

未关闭 适合新手
#5,268 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 3 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
70/100
Issue 类型
文档
描述清晰度
基本清楚
活跃度
活跃
技术栈
python, yaml
领域
documentation

调研方向

先比较 issue 中的两个规则示例(mit_1356.RULE 和 apache-2.0_1122.RULE),确认当前的 referenced_filenames 模式。然后在 repo 中找到规则格式文档或 parser/schema 文档,并搜索 referenced_filenames,以确定预期的相对路径约定。检查与规则加载相关的现有测试或示例,确认预期行为。当文档明确规定 canonical 格式,且示例与之相符时,即可完成。

由索引模型根据 Issue 内容生成。

描述

bug improve-license-detection question
Description

This isn't so much a bug report as more of a question. I can see that in certain rule files there are relative paths in the license text, but in referenced_filenames it is inconsistent. Sometimes referenced_filenames includes the relative component (such as ..), other times it doesn't.

An example is mit_1356.RULE:

---
license_expression: mit
relevance: 100
is_license_reference: yes
referenced_filenames:
    - LICENSE
---

{{licensed under MIT}}, see ../LICENSE

while in apache-2.0_1122.RULE:

---
license_expression: apache-2.0
is_license_notice: yes
relevance: 100
referenced_filenames:
    - ../../../LICENSE
---

## License

This code is licensed under {{Apache-2.0 }}(../../../LICENSE).

I could not find any guidance in the documentation about what the correct way is.

主要语言
Python
星标
2.7k
派生
831
平均合并
3 天 4 小时
30 天内合并 PR
7

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

aboutcode-org/scancode-toolkit 的其他 Issue

查看 aboutcode-org/scancode-toolkit 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。