Skip to content

CodeCharta snapshot

Source: actions/universal-codecharta-snapshot/action.yml

Runs the CodeCharta + DependaCharta analysis pipeline against the checked-out repository. Produces a ${project_name}.cc.json.gz map (and .cg.json graph in snapshot mode). Supports a single snapshot of HEAD or N historical snapshots over recent merge commits.

Usage

- uses: futuredapp/.github/.github/actions/universal-codecharta-snapshot@2.7.0
  with:
    mode: '...'
    project_name: '...'

Inputs

Name Type Required Default Description
mode string Yes — snapshot to analyze HEAD (produces map + graph); history to walk N recent first-parent merges and produce one map per merge into build/codecharta/pull-requests/ (no .cg.json per snapshot).
project_name string Yes — Used as the output file prefix. Conventionally equal to the consumer repo's name; appears as the folder name in the data repo's projects/<project_name>/ tree.
stack string No multi Stack profile that determines the default ccsh file-extension filter and tokei language filter. One of: swift, kotlin, kmp, ft-fullstack, multi. multi omits both filters and lets the analyzers consider every recognized file.
file_extensions string No — Optional override for the -fe= flag passed to ccsh unifiedparser. Comma-separated list of file extensions, e.g. kt,swift. When unset, defaults derived from stack apply.
tokei_types string No — Optional override for the --type flag passed to tokei. Comma-separated list of tokei language names, e.g. Kotlin,Swift. When unset, defaults derived from stack apply.
extra_excludes string No — Comma-separated regex patterns to exclude in addition to the analyzer defaults. Applied to ccsh -e= and tokei --exclude uniformly.
history_limit string No 20 Maximum number of first-parent merge commits to walk in history mode. Ignored in snapshot mode.
dependacharta_image string No ghcr.io/futuredapp/dependacharta-swift:fork-v0.2.1 Fully-qualified DependaCharta image reference. The Futured fork covers all upstream languages plus Swift; pin via this input if you need a specific tag.
analysis_image string No codecharta/codecharta-analysis:1.143.0 Fully-qualified ccsh / tokei analysis image. Pinned to a specific upstream release for reproducibility — bump intentionally when picking up upstream changes. Consumers can override via this input.

Outputs

Name Description
cc_path Path to the ${project_name}.cc.json.gz map produced in snapshot mode. Empty in history mode.
cg_path Path to the ${project_name}.cg.json DependaCharta graph produced in snapshot mode. Empty in history mode.
snapshots_dir Path to the directory containing the historical .cc.json.gz files produced in history mode. Empty in snapshot mode.