Skip to content

dsafdsaf132/change-impact-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[WIP] Change Impact Analyzer

Git-diff-oriented change impact analysis for code changes.

cia reports:

  • changed symbols
  • impacted symbols

Features

  • Diff-based impact analysis
  • Compare local changes, branches, or explicit Git bases
  • JSON and TOON output

Installation

From source:

git clone https://github.com/dsafdsaf132/change-impact-analyzer.git
cd change-impact-analyzer
cargo install --path .

Rust HIR analysis requires rustc-dev:

rustup component add rustc-dev

Usage

Scan local changes:

cia scan

Scan against an explicit base:

cia scan --diff-base main

Scan a branch against origin/main:

cia scan \
  --diff-mode merge-base \
  --upstream origin/main

Explain a reported symbol:

cia explain <symbol-id>

Emit TOON output:

cia scan --output toon

Backends

Rust is the first precise backend.

C++, Python, and TypeScript are planned.

Backend selection:

cia scan --rust-backend auto
cia scan --rust-backend rustc
cia scan --rust-backend rust-analyzer
cia scan --rust-backend off

Configuration

Project settings live in:

.cia/config.json

Example:

{
  "version": 1,
  "rust": {
    "matrix": {
      "targets": ["host", "wasm32-unknown-unknown"],
      "feature_sets": ["serde,cli"],
      "no_default_features": false,
      "all_features": false,
      "all_targets": false
    },
    "matrix_profiles": {
      "ci": {
        "all_targets": true
      }
    }
  }
}

Config fields:

Field Description Options Default
rust.matrix Default Rust analysis matrix. { targets, feature_sets, no_default_features, all_features, all_targets } Empty arrays and false booleans.
rust.matrix.targets Rust targets to check. ["host" | "default" | <target-triple>, ...] [], default target.
rust.matrix.feature_sets Cargo feature sets to check. [<cargo-feature-string>, ...] [], default feature set.
rust.matrix.no_default_features Disable Cargo default features. true or false. false
rust.matrix.all_features Check with all Cargo features enabled. true or false. false
rust.matrix.all_targets Check all Cargo targets. true or false. false
rust.matrix_profiles Named Rust matrix overrides. { "<profile-name>": { ...matrix } } {}

License

MIT License

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages