[Rust] How do I query function and module attributes?
Đang mở
question
Rust
- Ngôn ngữ chính
- CodeQL
- Star
- 10.1k
- Fork
- 2.1k
- Merge trung bình
- 2 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 141
Mô tả
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()
}
```
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.