use std::path::Path;
use crate::check_config::CheckConfig;
use crate::violation::Violation;
use super::cargo_meta::CargoMetadata;
use super::shape::FileShape;
use super::{feature_boundary, module_layout, type_footprint};
pub struct ProjectContext<'a> {
pub rust_files: &'a [String],
pub workspace_root: &'a Path,
pub metadata: Option<&'a CargoMetadata>,
pub file_shapes: &'a [FileShape],
}
pub fn check_project(
ctx: &ProjectContext<'_>,
config: &CheckConfig,
violations: &mut Vec<Violation>,
) {
module_layout::check_conflicting_module_root(ctx, config, violations);
module_layout::check_flat_module_family(ctx, config, violations);
feature_boundary::check_feature_boundary(ctx, config, violations);
type_footprint::check_type_footprint(ctx, config, violations);
}