Skip to content
Projets

À propos

A tool to stop JVM architecture drift before it reaches main. Configurable through yaml; no architecture test code.

Outils de développement

Comment ces chiffres sont mesurés

Progression mesurée des étoiles

in 24h
0
in 7 days
+1
in 15 days
-5
in 1 month
Historique en cours

Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.

README.md

Original

English • Español • 简体中文 • Português (Brasil) • Русский

Shamash

Shamash

Architecture checks for Java and Kotlin, without architecture tests.

Understand Java/Kotlin source dependencies and investigate package cycles in IntelliJ. Use standalone compiled-code checks in the CLI or CI to enforce configurable architecture policies.

Release CI License

First scan

Requires Java 17+ and compiled classes. Download the CLI archive and checksums, verify the archive, and add its bin directory to your PATH (shamash on Unix, shamash.bat on Windows).

./gradlew classes  # or ./mvnw package
shamash scan

Without a config, the scan reports findings but does not write project files or fail because of architecture violations.

Enforce rules

shamash init
shamash validate
shamash scan --fail-on ERROR

init creates shamash/configs/asm.yml with a dependency-cycle rule. Use shamash init --preset spring for Spring defaults or --preset reference for the full example.

For an existing codebase, run shamash baseline create to accept current findings. Commit the updated config and .shamash/baseline/asm-baseline.json; subsequent scans report new violations.

GitHub Actions

name: Architecture

on: [pull_request, push]

jobs:
  architecture:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: actions/setup-java@v5
        with:
          distribution: temurin
          java-version: '17'
      - run: ./gradlew classes
      - uses: aalsanie/[email protected]
        with:
          config: shamash/configs/asm.yml
          fail-on: ERROR

Replace the build step with ./mvnw package for Maven. The Action verifies the CLI download checksum before scanning.

Exit codes: 0 completed below threshold; 2 configuration or input error; 3 failed or incomplete scan; 4 findings at or above the threshold.

IntelliJ

Install from JetBrains Marketplace and open Tools → Shamash. Select Findings or Explore, then choose Analyze project to investigate Java/Kotlin production-source dependencies. The plugin does not evaluate your project YAML policies or perform custom fixes; use the CLI for enforcement, reports, and baselines. See the upgrade notes for retired actions and shortcuts.

Library

Published on Maven Central for Java 17+.

Gradle

dependencies {
    implementation("io.github.aalsanie:shamash-asm-core:0.92.0")
}

Maven

<dependency>
    <groupId>io.github.aalsanie</groupId>
    <artifactId>shamash-asm-core</artifactId>
    <version>0.92.0</version>
</dependency>
import io.shamash.asm.core.scan.ScanOptions
import io.shamash.asm.core.scan.ShamashAsmScanRunner
import java.nio.file.Path

val result = ShamashAsmScanRunner().run(ScanOptions(projectBasePath = Path.of(".")))
check(result.isSuccess) { result.toString() }
val findings = requireNotNull(result.engine).findings

isSuccess confirms scan completion, not the absence of violations.

Beyond the basics

Configure API and annotation restrictions, JAR-origin rules, dependency metrics, and graph checks. Export JSON, SARIF, HTML, or XML reports; inspect facts, hotspots, and architecture scores. Add custom rule registries where built-in rules aren't enough.

CLI options and checksums · Configuration examples · Custom registries · Benchmarks

Changelog · Security · Contributing · License

License

Shamash CLI and the core libraries are licensed under AGPL-3.0-only. The IntelliJ plugin module remains Apache-2.0; its distribution includes AGPL-licensed core libraries. See third-party notices. Releases before 1.0.0 retain their original Apache-2.0 terms.

Explorer des projets similaires

Chargement…