rakaarwaky/lint-arwaky·#229· merged

fix(shared): raise health score of shared crate to >5 (refactor + health-rules)

Analysed against f0cb040110 files changedby rakaarwaky
Open PR on GitHub

Change-risk score

9.6out of 10Elevated
Repository health
5.7to6.9base against this head

This change sits in the top third of this repository's own risk distribution, the band worth reviewing closely. It is riskier than 93% of this repository's own commits.

No changed file lost health in this diff. 8 contracts changed, called by 35 symbols in files this PR does not touch.

Files changed
10
in this diff
Contracts changed
8
removed or signature
Outside callers
35
not in this diff
Findings added
10
10 resolved

Blast radius on the repo map

Every file in the repository, grouped into its own directories and sized by lines. The ones this PR changes are lit, and everything that imports them is marked.

cratesconfig-systemdispatcherexternal-lintfilesystemgit-hooksimport-rulesmaintenancemcp-servernaming-rulesorphan-rulesquality-rulesreport-f…role-rulessharedtuisrcsrcsrcsrcsrcsrcsrcsrcsrcsrcsrcsrcsrcsrccommonconfig_systemfilesystemimport_r…orphan_rules
changed, health fellchanged, health rosechanged, health heldimports a changed fileuntouchedchanged by this PR

Drawing 406 of 411 files at a readable size, grouped by directory and sized by lines of code. 10 changed here reach 33 more by import. 5 are too small to see at this width, which is what the frame below is for.

Inside crates/shared/src

auto_fixcli_comman…commonconfig_systemfile_watchfilesystemgit_hooksimport_rulesmaintenanceorphan_rulesreport_form…role_rulestuita…taxonom…taxonomy_…tax…tax…taxonomy_…mo…ta…ta…taxonomy_adap…taxonomy_code…taxonomy_comm…taxonomy_comm…taxo…taxo…taxo…taxo…taxo…taxo…taxo…taxo…taxonomy_job_vo.…ta…taxonomy_language_v…taxonomy…taxonomy…taxonomy…taxonomy…taxono…ta…ta…taxon…ut…uti…utility_layer_dete…utili…utili…utility_rust_parser.…uti…utility_signature_p…utility_ts_parser.rsutili…co…mod…taxonomy_conf…taxonomy_set…utility_confi…co…con…taxo…tax…cont…contr…taxonomy_filesyst…co…taxono…contr…contr…co…co…mo…taxo…taxonom…taxonomy…tax…co…co…mod…taxonom…taxonomy_or…taxon…taxon…ta…mod.…taxonomy…taxonomy…taxon…taxon…taxonomy_st…taxonomy_…

180 files, 10 changed by this PR and 21 that import one. Click any directory above to frame it instead.

Changed

Contracts this PR changes

Only symbols that were removed or had their signature changed. An added symbol has no prior callers, and a body-only change leaves the caller's contract intact, so neither is a finding.

ErrorMessageremovedcrates/shared/src/common/taxonomy_common_vo.rs:687

7 callers outside this PR, 1 inside it.

crates/shared/src/common/taxonomy_adapter_error.rs::AdapterError::newcrates/shared/src/common/taxonomy_adapter_error.rs::ScanError::newcrates/shared/src/common/taxonomy_adapter_error.rs::ValidationError::newcrates/shared/src/common/taxonomy_filesystem_error.rs::FileSystemError::newcrates/shared/src/common/taxonomy_operation_error.rs::LinterOperationError::messagecrates/shared/src/config_system/taxonomy_config_error.rs::ConfigError::newcrates/shared/src/import_rules/taxonomy_import_error.rs::ImportError::invalid_configuration
Countremovedcrates/shared/src/common/taxonomy_common_vo.rs:192

6 callers outside this PR.

crates/shared/src/auto_fix/taxonomy_fix_applied_event.rs::FixApplied::newcrates/shared/src/common/taxonomy_code_analysis_vo.rs::default_max_linescrates/shared/src/common/taxonomy_code_analysis_vo.rs::default_min_linescrates/shared/src/config_system/taxonomy_setting_vo.rs::Thresholds::newcrates/shared/src/file_watch/taxonomy_diff_result_vo.rs::GitDiffResultVO::newcrates/shared/src/maintenance/taxonomy_stats_vo.rs::MaintenanceStatsVO::new
newremovedcrates/shared/src/common/taxonomy_adapter_list_vo.rs:12

2 callers outside this PR.

crates/external-lint/src/agent_external_lint_orchestrator.rs::ExternalLintOrchestrator::adapter_namescrates/external-lint/src/capabilities_external_lint_selector.rs::CapabilitiesExternalLintSelector::select_adapters
newremovedcrates/shared/src/git_hooks/taxonomy_hook_error.rs:12

2 callers outside this PR.

crates/git-hooks/src/capabilities_hook_adapter.rs::GitHookAdapter::install_pre_commitcrates/git-hooks/src/capabilities_hook_adapter.rs::GitHookAdapter::uninstall_pre_commit
RenamedFileListremovedcrates/shared/src/common/taxonomy_paths_vo.rs:17

1 caller outside this PR.

crates/shared/src/file_watch/taxonomy_diff_result_vo.rs::GitDiffResultVO::new
newremovedcrates/shared/src/file_watch/taxonomy_service_error.rs:12

1 caller outside this PR.

crates/file-watch/src/capabilities_notify_provider.rs::NotifyWatchProvider::start
newsignature changedcrates/shared/src/common/taxonomy_common_vo.rs:175

15 callers outside this PR.

crates/config-system/src/agent_config_orchestrator.rs::ConfigOrchestrator::ignored_pathscrates/config-system/src/agent_config_orchestrator.rs::ConfigOrchestrator::ignored_paths_for_languagecrates/external-lint/src/capabilities_external_lint_executor.rs::ExternalLintExecutor::exec_cmd_adaptercrates/external-lint/src/capabilities_external_lint_executor.rs::ExternalLintExecutor::exec_cmd_scancrates/external-lint/src/capabilities_rs_audit_adapter.rs::CargoAuditAdapter::scancrates/external-lint/src/capabilities_rs_clippy_adapter.rs::RustLinterAdapter::apply_fixcrates/external-lint/src/capabilities_rs_clippy_adapter.rs::RustLinterAdapter::scancrates/external-lint/src/capabilities_rs_fmt_adapter.rs::RustFmtAdapter::apply_fixcrates/external-lint/src/capabilities_rs_fmt_adapter.rs::RustFmtAdapter::scancrates/filesystem/src/agent_filesystem_orchestrator.rs::FilesystemOrchestrator::collect_source_filescrates/filesystem/src/agent_filesystem_orchestrator.rs::FilesystemOrchestrator::discover_source_filescrates/naming-rules/benches/bench_naming_rules.rs::make_layer_mapcrates/orphan-rules/src/capabilities_orphan_capabilities_analyzer.rs::CapabilitiesOrphanAnalyzer::is_capabilities_orphancrates/project-setup/src/capabilities_setup_processor.rs::SetupManagementProcessor::install_javascript_adapterscrates/project-setup/src/capabilities_setup_processor.rs::SetupManagementProcessor::install_python_adapters
newsignature changedcrates/shared/src/common/taxonomy_paths_vo.rs:14

1 caller outside this PR.

crates/git-hooks/src/capabilities_diff_checker.rs::DiffChecker::collect_by_filter_renamed

What this PR added, and what it took away

Introduced findings are the ones inside the lines this PR added, not the file's existing ones. The resolved column is the only place in the product that lists them.

Introduced (10)
  • highcomplex method
    crates/shared/src/common/utility_ts_parser.rs:211

    strip_line_comments_and_track_strings has cyclomatic complexity 23

  • mediumcomplex method
    crates/shared/src/common/utility_ts_parser.rs:70

    collect_identifiers has cyclomatic complexity 12

  • mediumcomplex method
    crates/shared/src/common/utility_ts_parser.rs:30

    parse_ts_line has cyclomatic complexity 10

  • mediumlow cohesion
    crates/shared/src/filesystem/taxonomy_filesystem_vo.rs:497

    InboundLinkMap has low cohesion (LCOM4=2): its 8 methods split into 2 groups that share no fields or calls

  • lowdry violation
    crates/shared/src/common/utility_path_filter.rs:49

    9% of file duplicated; worst clone shares 6 lines with crates/shared/src/common/utility_path_filter.rs

  • lowprimitive obsession
    crates/shared/src/common/utility_rust_parser.rs:159

    walk_use_rename takes 5 parameters

  • lowprimitive obsession
    crates/shared/src/common/utility_rust_parser.rs:119

    walk_use_name takes 5 parameters

  • lowprimitive obsession
    crates/shared/src/common/utility_rust_parser.rs:102

    walk_use_path takes 5 parameters

  • lowprimitive obsession
    crates/shared/src/common/utility_rust_parser.rs:79

    walk_use_tree takes 5 parameters

  • lowprimitive obsession
    crates/shared/src/config_system/utility_config_parser.rs:228

    apply_suffix_update takes 5 parameters

Resolved (10)
  • large method
    crates/shared/src/common/utility_ts_parser.rs
  • large method
    crates/shared/src/common/utility_python_parser.rs
  • large method
    crates/shared/src/common/utility_path_filter.rs
  • low cohesion
    crates/shared/src/common/taxonomy_error_vo.rs
  • low cohesion
    crates/shared/src/common/taxonomy_adapter_list_vo.rs
  • dry violation
    crates/shared/src/common/taxonomy_adapter_list_vo.rs
  • low cohesion
    crates/shared/src/common/taxonomy_name_vo.rs
  • dry violation
    crates/shared/src/common/taxonomy_name_vo.rs
  • low cohesion
    crates/shared/src/common/taxonomy_paths_vo.rs
  • dry violation
    crates/shared/src/common/taxonomy_paths_vo.rs

Who else knows this code

The primary author of each changed file by share of its recent commits, mined from git history. Advisory: it says who has context, not who must review.

  • crates/shared/src/common/utility_path_filter.rsrakaarwaky 100% of 1 commits · the PR author
  • crates/shared/src/common/utility_layer_detector.rsrakaarwaky 100% of 13 commits · the PR author
  • crates/shared/src/filesystem/taxonomy_filesystem_vo.rsrakaarwaky 100% of 14 commits · the PR author
  • crates/shared/src/common/utility_signature_parser.rsrakaarwaky 100% of 3 commits · the PR author

Get this on your own pull requests

This page came from an index of rakaarwaky/lint-arwaky. No model calls, no configuration, and it refreshes on every push. Install the bot and every pull request gets one of these.