From c81ae710b56bf945d881f6642a8502eeac803e7d Mon Sep 17 00:00:00 2001 From: Dustin Lagoy Date: Tue, 14 May 2024 07:14:46 -0700 Subject: [PATCH] add some documentation --- helix-view/src/coverage.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/helix-view/src/coverage.rs b/helix-view/src/coverage.rs index 91019b49f..0c445e7ff 100644 --- a/helix-view/src/coverage.rs +++ b/helix-view/src/coverage.rs @@ -75,6 +75,11 @@ struct Line { hits: u32, } +/// Get coverage information for a document from the configured coverage file. +/// +/// The coverage file is set by environment variable HELIX_COVERAGE_FILE. This +/// function will return None if the coverage file is not found, invalid, does +/// not contain the document, or if it is out of date compared to the document. pub fn get_coverage(document_path: &std::path::PathBuf) -> Option { let coverage_path = std::env::var("HELIX_COVERAGE_FILE").ok()?; log::debug!("coverage file is {}", coverage_path);