涵蓋範圍

回報問題 查看原始碼 Nightly 8.1 · 8.0 · 7.5 · 7.4 · 7.3 · 7.2

輔助函式,用於存取涵蓋率相關基礎架構。

成員

instrumented_files_info

InstrumentedFilesInfo coverage_common.instrumented_files_info(ctx, *, source_attributes=[], dependency_attributes=[], extensions=None, metadata_files=[])

建立新的 InstrumentedFilesInfo 例項。使用這個提供者,傳達目前建構規則的涵蓋率相關屬性。

參數

參數 說明
ctx ctx; required
The rule context.
source_attributes sequence;預設為 []
。 包含此規則處理的來源檔案的屬性名稱清單。
dependency_attributes sequence;預設為 []
清單列出可能提供執行階段依附元件 (程式碼依附元件或執行檔) 的屬性名稱。
extensions 字串序列;或 None;預設為 None
用於篩選 source_attributes 中的檔案副檔名。例如「js」。如果未提供 (或為 None),則會將 source_attributes 中的所有檔案新增至檢測檔案;如果提供空白清單,則不會新增任何來源屬性檔案。
metadata_files File序列;預設為 []
。 在程式碼執行後產生涵蓋率 LCOV 檔案所需的其他檔案,例如 C++ 的 .gcno 檔案。