Skip to main content

dry4rust/
analysis_config.rs

1// Copyright (c) 2026 Matjaz Domen Pecan
2// Copyright 2026 Umberto Gotti <umberto.gotti@umbertogotti.dev>
3// Licensed under the MIT License
4// SPDX-License-Identifier: MIT
5
6/// The subset of configuration a language analyzer needs.
7///
8/// `LanguageAnalyzer` takes this rather than the whole [`crate::config::Config`]
9/// so a backend cannot reach for a threshold, a ceiling or an ignore path that
10/// has nothing to do with turning source into code units.
11#[derive(Debug, Clone, PartialEq, Eq)]
12pub struct AnalysisConfig {
13    /// Minimum number of AST nodes for a code unit to be analyzed.
14    pub min_nodes: usize,
15    /// Minimum number of source lines for a code unit to be analyzed.
16    pub min_lines: usize,
17}