- Edit engine: generic span edits (replace/insert/delete) with stale-index guard; mv and fix share one atomic apply/rollback/diff/--json pipeline - jmove mv|check|fix commands; java rules: unused-import, missing-import (unique-FQN insert, ambiguous -> candidates for agents), import-order (google style; cross-rule byte conflicts prune by severity and converge) - mv of tracked files goes through git mv (staged rename, --no-git opt-out, moved_via/would_move_via in --json, GIT_ERROR code) - fix java extract_package losing single-segment packages (bare identifier, not scoped_identifier) — broke the FQN index for 'package p;' projects - core::rel_str: project-relative paths rendered with '/' on every platform (human/JSON/diff headers/git pathspecs), Path::display() no longer used for output; e2e fixtures: java/fix, java/fix_missing, java/order
19 lines
877 B
Rust
19 lines
877 B
Rust
//! `jmove` — a project-aware file mover and import fixer for
|
|
//! TypeScript/JavaScript and Java.
|
|
//!
|
|
//! Moving a file inside a project invalidates every relative import that
|
|
//! points at it. `jmove` indexes the project's import graph, computes the
|
|
//! minimal set of specifier rewrites, and applies everything atomically
|
|
//! (with rollback), optionally in dry-run mode. The same engine drives
|
|
//! `fix`, which auto-repairs small import problems via deterministic rules.
|
|
//!
|
|
//! Module map:
|
|
//! - [`cli`] — argument parsing, command dispatch, user-facing output.
|
|
//! - [`core`] — indexing, dependency graph, move/fix planning, atomic apply.
|
|
//! - [`parser`] — language frontends (import extraction, path resolution, fix rules).
|
|
//! - [`cache`] — on-disk index cache (Phase 2, intentionally empty for now).
|
|
|
|
pub mod cache;
|
|
pub mod cli;
|
|
pub mod core;
|
|
pub mod parser;
|