[Rust] How do I query function and module attributes?
未关闭
question
Rust
- 主要语言
- CodeQL
- 星标
- 10.1k
- 派生
- 2.1k
- 平均合并
- 2 天 15 小时
- 30 天内合并 PR
- 141
描述
I wanted to filter out tests from my results, based on if they either had a #[test] attribute or #[cfg(test)].
Currently tried something similar to this but cant figure out how to properly filter this from the docs
```ql
predicate doesntWork(Module mod, Attr a, Meta m) {
a = mod.getAnAttr() and
m = a.getMeta() and
m.hasPath() and
m.getPath().toString() = "cfg" and
m.hasTokenTree()
}
```
贡献指南
评估
这个 Issue 还没有评估数据。