rustqual 1.4.1

Comprehensive Rust code quality analyzer — seven dimensions: IOSP, Complexity, DRY, SRP, Coupling, Test Quality, Architecture
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! `ProjectScope` / own-call recognition tests. Split into focused sub-files
//! (each ≤ the SRP file-length cap); shared imports + the `build_scope` helper
//! live here and reach the sub-modules via `use super::*`.

pub(super) use crate::adapters::analyzers::iosp::scope::*;
pub(super) use std::collections::{HashMap, HashSet};
pub(super) use syn::visit::Visit;
pub(super) use syn::{File, ImplItem, TraitItem};

mod collection_and_ownership;
mod trivial_and_edge_cases;

pub(super) fn build_scope(code: &str) -> ProjectScope {
    let syntax = syn::parse_file(code).expect("Failed to parse test code");
    let files = vec![("test.rs", &syntax)];
    ProjectScope::from_files(&files)
}