mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-09 19:45:13 +02:00
docs: Enhance module documentation across various files for clarity a… (#62)
* docs: Enhance module documentation across various files for clarity and completeness * fix: Remove unnecessary blank line in build.rs for cleaner code * docs: Update documentation to improve clarity and consistency in code comments
This commit is contained in:
parent
40995e45e7
commit
1f2bfe76c1
44 changed files with 721 additions and 366 deletions
|
|
@ -1,3 +1,14 @@
|
|||
//! SQLite connection pool and schema for the incremental index.
|
||||
//!
|
||||
//! The index stores file content hashes, per-file scan results, and function
|
||||
//! summaries so subsequent scans can skip files whose content has not changed.
|
||||
//! The pool is backed by [`r2d2`] with WAL journaling, `synchronous=NORMAL`,
|
||||
//! and memory-mapped I/O tuned for large codebases.
|
||||
//!
|
||||
//! Tables: `files`, `issues`, `function_summaries`, `ssa_function_summaries`.
|
||||
//! SSA-specific persistence lives in [`crate::summary::ssa_summary`]; routines
|
||||
//! here cover function summaries and file-level hash bookkeeping.
|
||||
|
||||
pub mod index {
|
||||
#![allow(clippy::too_many_arguments, clippy::type_complexity)]
|
||||
|
||||
|
|
@ -615,7 +626,7 @@ pub mod index {
|
|||
})
|
||||
}
|
||||
|
||||
/// Like [`should_scan`] but accepts a pre-computed hash to avoid
|
||||
/// Like `should_scan` but accepts a pre-computed hash to avoid
|
||||
/// redundant file reads.
|
||||
pub fn should_scan_with_hash(&self, path: &Path, hash: &[u8]) -> NyxResult<bool> {
|
||||
let row: Option<Vec<u8>> = self
|
||||
|
|
@ -673,7 +684,7 @@ pub mod index {
|
|||
/// (`file_id, rule_id, line, col`) to defend against upstream bugs
|
||||
/// that produce same-keyed diagnostics with differing severity or
|
||||
/// cosmetic fields. The first-seen row wins; upstream
|
||||
/// [`crate::ast::ParsedSource::finalize_diags`] sorts so that high
|
||||
/// `ParsedSource::finalize_diags` sorts so that high
|
||||
/// severity comes first, and this fallback preserves that ordering.
|
||||
pub fn replace_issues<'a>(
|
||||
&mut self,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue