Build tracing filtering: path-based inclusion & content-based exclusion
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 38/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 领域
- build-system, tooling
调研方向
从 CodeQL CLI 的 database trace-command 流程和现有 extractor 的 exclude 选项开始,然后追踪 Java 和 Kotlin 编译器输入是如何传递给提取过程的。该请求有两个独立目标:基于路径的包含和基于内容的排除。完成标准是定义并实现这两种过滤行为,并记录其命令行配置和支持的匹配语义。
由索引模型根据 Issue 内容生成。
描述
I'm using the CodeQL CLI with a large Java/Kotlin project that makes heavy use of autogenerated source during the build process. Because of this, I am using build tracing (codeql database trace-command) to extract CodeQL databases.
Is there any way to filter the files processed by the extractor in the following ways? If not, please consider this a feature request :)
Include-filtering by path
I'd like to be able to extract databases for certain components of the project. Due to the complexity of the project's build system, it's not easy to just build/trace only those components of the project; instead it would be much easier if I could just restrict extraction to those components' files by providing path globs during build tracing.
I'm aware that files can be excluded using the exclude extractor option, but this only allows certain path globs to be excluded, not included.
Exclude-filtering by file contents
As mentioned earlier, the project has a lot of autogenerated code, some (but only some) of which needs to be ignored. This code is often generated with paths that are not easily excludable using the existing path-glob-based exclusions. It would be great if I can specify regexes to search for in the content of files that indicate that the file should not be extracted (e.g. to look for things like "// Autogenerated file, do not edit", etc.)
If there isn't a way to do these, I'm happy to hear about hacky workarounds. For example, the commands I trace are already wrapped in shell scripts that wrap the underlying compilers (javac etc.) in order to provide for more filtering criteria than mentioned here. However, it's hard to do the above properly using such a wrapper because of i.e. the need to properly parse the original compiler command line arguments, handle things like files in JAR files, indirect command line options, etc. The extractor is much better placed to handle such filtering.
- 主要语言
- CodeQL
- 星标
- 10.1k
- 派生
- 2.1k
- 平均合并
- 2 天 16 小时
- 30 天内合并 PR
- 143
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/codeql 的其他 Issue
-
agentic-workflows
难度 2/5 1-3 小时 新手友好度 70/100
-
false-positive javascript
难度 2/5 1-3 小时 新手友好度 84/100
-
难度 2/5 1-3 小时 新手友好度 82/100
-
难度 2/5 1-3 小时 新手友好度 78/100
-
false-positive
难度 2/5 1-3 小时 新手友好度 70/100
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
conda-forge/nccl-feedstock#166 ·
-
难度 2/5 1-3 小时 新手友好度 82/100
dsx-ai-factory/infra-controller#6694 ·
-
bug build
难度 2/5 1-3 小时 新手友好度 88/100
facebookincubator/velox#19143 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
pydantic/pydantic-ai#8636 ·
-
0.kind: enhancement 9.needs: package (update)
难度 2/5 1-3 小时 新手友好度 74/100