Skip to main content

codeint 0.8.0 copy "codeint: ^0.8.0" to clipboard
codeint: ^0.8.0 copied to clipboard

Programmatic Dart client SDK and CLI runner for codeint, measuring Software entropy and Hazards.

codeint #

Official pure Dart client SDK and CLI runner for codeint.

codeint measures the Software entropy of a codebase and reports Hazards next to Software entropy across TypeScript, JavaScript, Rust, PHP, Dart, Python, Go, SQL, and Shell.

Installation #

Add codeint to your pubspec.yaml:

dev_dependencies:
  codeint: ^0.8.0

Pre-warm the verified native binary cache if desired:

dart run codeint:install

Run the CLI directly through Dart:

dart run codeint check

Programmatic usage #

import 'package:codeint/codeint.dart';

Future<void> main() async {
  final client = CodeintClient(cwd: '.');
  final result = await client.check();
  if (!result.passed) {
    throw StateError('codeint failed: ${result.failures.join(', ')}');
  }
  final production = result.report.sourceSets['production'];
  print('Erosion ratio: ${production?.erosion.ratio}');
}

Binary resolution #

ensureBinary() resolves the native codeint binary in four deterministic steps:

  1. Explicit binaryPath option.
  2. CODEINT_BIN environment variable.
  3. Version-matching codeint executable on PATH.
  4. Version-pinned GitHub Release archive verified against SHA256SUMS before extraction and stored in the local user cache.

Set allowDownload: false in offline CI environments to fail fast without network access when no local binary is available.

0
likes
0
points
345
downloads

Publisher

unverified uploader

Weekly Downloads

Programmatic Dart client SDK and CLI runner for codeint, measuring Software entropy and Hazards.

Repository (GitHub)
View/report issues

Topics

#static-analysis #code-quality #metrics #cli #linter

License

unknown (license)

Dependencies

archive, crypto

More

Packages that depend on codeint