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:
Eli Peter 2026-05-02 17:46:45 -04:00 committed by GitHub
parent 40995e45e7
commit 1f2bfe76c1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
44 changed files with 721 additions and 366 deletions

View file

@ -713,6 +713,22 @@ fn builtin_profile(name: &str) -> Option<ScanProfile> {
})
}
/// Top-level scanner configuration.
///
/// Loaded from `nyx.conf` (TOML) via [`Config::load`], or constructed in
/// code for embedded use. [`Config::default`] gives conservative defaults:
/// no symlink following, no hidden files, gitignore respected, 10 s parse
/// timeout, all analysis passes on.
///
/// Config sections mirror `nyx.conf` sections:
/// - [`scanner`](Config::scanner): what files to scan, which analysis passes
/// to enable, severity floor
/// - [`output`](Config::output): format, ranking, LOW-finding budgets
/// - [`analysis`](Config::analysis): per-language rules, engine-pass toggles
/// - [`performance`](Config::performance): thread count, depth limit, batch
/// size
/// - [`database`](Config::database): incremental index settings
/// - [`detectors`](Config::detectors): per-detector sensitivity knobs
#[derive(Debug, Serialize, Deserialize, Clone)]
#[serde(default)]
#[derive(Default)]

View file

@ -1,3 +1,16 @@
//! Shared utilities and configuration.
//!
//! Re-exports [`Config`], [`AnalysisOptions`], and [`DetectorOptions`] from
//! their submodules. [`Config`] is loaded from `nyx.conf` and passed through
//! the top-level call stack. [`AnalysisOptions`] is installed once per process
//! via an `OnceLock` and read back via [`analysis_options::current`] from deep
//! inside the analysis pipeline without threading it through every call frame.
//!
//! Other submodules: `path` (root-relative path utilities and traversal guards),
//! `project` (framework detection, project metadata), `query_cache` (cached
//! tree-sitter query compilation), `snippet` (source snippet extraction for
//! finding locations).
pub mod analysis_options;
pub mod config;
pub mod detector_options;