diff --git a/.rules b/.rules index 6eea35b1..f1c02f5b 100644 --- a/.rules +++ b/.rules @@ -1,7 +1,7 @@ # Agent guidance -codeint is a command-line tool that measures the Software entropy of a codebase, in any language that has a Language plugin, so that developers who work with coding agents see it grow before it compounds. -Built-in Language plugins cover TypeScript/JavaScript/Vue/Svelte, Rust, PHP, Dart, Python, and Go. +codeint is a command-line tool that measures the Software entropy of a codebase, and reports Hazards next to Software entropy, in any language that has a Language plugin, so that developers who work with coding agents see it grow before it compounds. +Built-in Language plugins cover TypeScript/JavaScript/Vue/Svelte, Rust, PHP, Dart, Python, Go, and SQL. Test gap measures untested Production Function mass from user-named LCOV or Cobertura XML Coverage reports; codeint never runs tests and never guesses report paths. Kit: avidianity/factory v0.4.0, bootstrapped 2026-11-21. diff --git a/Cargo.lock b/Cargo.lock index b7fb1e9a..59df248d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -93,6 +93,15 @@ version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" +[[package]] +name = "ar_archive_writer" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "523e5e187fff36fcb8d1d19ccf0ca4ca43ec3d158316057f66dc6f72716bc5ec" +dependencies = [ + "object 0.39.1", +] + [[package]] name = "arbitrary" version = "1.5.0" @@ -290,6 +299,7 @@ dependencies = [ "codeint-lang-php", "codeint-lang-python", "codeint-lang-rust", + "codeint-lang-sql", "codeint-lang-ts", "codeint-metrics", "codeint-model", @@ -376,6 +386,14 @@ dependencies = [ "toml", ] +[[package]] +name = "codeint-lang-sql" +version = "0.6.0" +dependencies = [ + "codeint-model", + "sqlparser", +] + [[package]] name = "codeint-lang-ts" version = "0.6.0" @@ -419,6 +437,7 @@ dependencies = [ "codeint-lang-php", "codeint-lang-python", "codeint-lang-rust", + "codeint-lang-sql", "codeint-lang-ts", "codeint-model", "thiserror", @@ -2179,6 +2198,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "object" +version = "0.39.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e5a6c098c7a3b6547378093f5cc30bc54fd361ce711e05293a5cc589562739b" +dependencies = [ + "memchr", +] + [[package]] name = "object" version = "0.40.0" @@ -2573,6 +2601,16 @@ dependencies = [ "parking_lot", ] +[[package]] +name = "psm" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dcd034599e63b970727f70d79e02d62390a4a84f7c6b827c27c46d5ac3fa622" +dependencies = [ + "ar_archive_writer", + "cc", +] + [[package]] name = "pulley-interpreter" version = "51.0.0" @@ -2631,6 +2669,26 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "recursive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0786a43debb760f491b1bc0269fe5e84155353c67482b9e60d0cfb596054b43e" +dependencies = [ + "recursive-proc-macro-impl", + "stacker", +] + +[[package]] +name = "recursive-proc-macro-impl" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76009fbe0614077fc1a2ce255e3a1881a2e3a3527097d5dc6d8212c585e7e38b" +dependencies = [ + "quote", + "syn 2.0.119", +] + [[package]] name = "redox_syscall" version = "0.5.18" @@ -2938,12 +2996,35 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8e2fb0f499abb4d162f2bedad68f5ef91a1682b5a03596ddb67efd37768d100" +[[package]] +name = "sqlparser" +version = "0.64.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92e0d273b4f8ddd14a35ed36862acbc9cc96cec578e36ee1881a9d42e0e0f2c8" +dependencies = [ + "log", + "recursive", +] + [[package]] name = "stable_deref_trait" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" +[[package]] +name = "stacker" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "707f49d46706bacf8a2b00d51dace3f9de527c13eec3778f570c411f89e69967" +dependencies = [ + "cc", + "cfg-if", + "libc", + "psm", + "windows-sys", +] + [[package]] name = "static_assertions" version = "1.1.0" @@ -3339,7 +3420,7 @@ dependencies = [ "log", "mach2", "memfd", - "object", + "object 0.40.0", "once_cell", "postcard", "pulley-interpreter", @@ -3378,7 +3459,7 @@ dependencies = [ "hashbrown 0.17.1", "indexmap", "log", - "object", + "object 0.40.0", "postcard", "rustc-demangle", "semver", @@ -3439,7 +3520,7 @@ dependencies = [ "gimli", "itertools", "log", - "object", + "object 0.40.0", "pulley-interpreter", "smallvec", "target-lexicon", @@ -3494,7 +3575,7 @@ checksum = "a0896123c430d063ba957dbe4c937740d3368c4877ecb208990d8f214cf1c4a9" dependencies = [ "cranelift-codegen", "log", - "object", + "object 0.40.0", "wasmtime-environ", ] diff --git a/Cargo.toml b/Cargo.toml index c4a4f3b4..e95d1a46 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,6 +17,7 @@ codeint-lang-go = { path = "plugins/languages/go" } codeint-lang-php = { path = "plugins/languages/php" } codeint-lang-python = { path = "plugins/languages/python" } codeint-lang-rust = { path = "plugins/languages/rust" } +codeint-lang-sql = { path = "plugins/languages/sql" } codeint-lang-ts = { path = "plugins/languages/ts" } codeint-metrics = { path = "crates/metrics" } codeint-model = { path = "crates/model" } @@ -37,6 +38,7 @@ schemars = "=1.2.3" serde = { version = "=1.0.229", features = ["derive"] } serde-saphyr = { version = "=2.1.1", default-features = false, features = ["deserialize"] } serde_json = "=1.0.154" +sqlparser = "=0.64.0" syn = { version = "=2.0.119", features = ["full", "visit"] } tempfile = "=3.27.0" thiserror = "=2.0.21" diff --git a/GLOSSARY.md b/GLOSSARY.md index b62ec214..bf60b09c 100644 --- a/GLOSSARY.md +++ b/GLOSSARY.md @@ -1,8 +1,8 @@ # codeint -codeint measures the Software entropy of a codebase, in any language that has a Language plugin: Erosion, Cognitive complexity, Test gap, Duplication, Verbosity, Import cycles, Import boundaries, Orphan files, and Dependency hygiene. +codeint measures the Software entropy of a codebase (Erosion, Cognitive complexity, Test gap, Duplication, Verbosity, Import cycles, Import boundaries, Orphan files, and Dependency hygiene) and reports Hazards next to Software entropy, in any language that has a Language plugin. It is for developers whose code is increasingly written by coding agents, so they see Software entropy grow before it compounds. -Built-in Language plugins cover TypeScript/JavaScript/Vue/Svelte, Rust, PHP, Dart, Python, and Go. +Built-in Language plugins cover TypeScript/JavaScript/Vue/Svelte, Rust, PHP, Dart, Python, Go, and SQL. ## Language @@ -92,7 +92,7 @@ A package declared by a repository workspace or by a module manifest such as `go _Avoid_: subpackage, member package, workspace member **Finding**: -One located piece of evidence behind a Metric value, such as an eroded function, an untested function, a Clone group, a Flagged line, or an Import cycle. +One located piece of evidence behind a Metric value, such as an eroded function, an untested function, a Clone group, a Flagged line, a Hazard line, or an Import cycle. _Avoid_: issue, violation, warning, hotspot **Reference range**: diff --git a/README.md b/README.md index 9c2d96ff..3c7d2784 100644 --- a/README.md +++ b/README.md @@ -30,8 +30,8 @@ Coding agents write locally valid code very quickly. Each pull request can pass tests and linters while quietly adding copied blocks, redundant branches, deeper functions, unused dependencies, and tangled imports. Over dozens of changes, that structural drag compounds until both humans and agents slow down. -codeint measures **Software entropy** directly from the shape of your source code so you see it grow before it compounds. -It ships with six built-in Language plugins covering TypeScript/JavaScript (including React `.jsx`/`.tsx`, Vue, and Svelte `