pnpm build, npm run build or make build checks your project first. If any file is below your threshold, the build stops before the compiler starts.
The build gate requires Iris Code Pro.
Installing
Run Iris Code: Install Build Hook from the command palette. Iris Code detects your project type and installs the hook. No manual edits to config files are needed.What it does
1
Detects your project type
Looks for
package.json (Node), go.mod (Go), Cargo.toml (Rust), pyproject.toml / requirements.txt (Python), Gemfile (Ruby), a .csproj / .sln (.NET), or pom.xml / build.gradle (Java).2
Installs the hook
- Node: adds a
prebuildentry topackage.json, chaining safely before any existingprebuildcommand. - Everything else: writes an
iris-checktarget into your Makefile and wires it as a prerequisite of thebuildoralltarget. Where the Makefile has to be created, its build command matches the project:go build ./...,cargo build,dotnet build, or./gradlew build,gradle buildandmvn testfor Java depending on which wrapper and build files are present.
3
Runs on every build
If any file falls below
minHealthScore, the build exits 1 and lists the offending files. Otherwise it proceeds normally.Configuring the threshold
SetminHealthScore in .irisconfig.json to control the minimum acceptable score. It defaults to 70.
Insights tracking
Every build hook run is recorded as a pass or fail in your account Insights, so enforcement activity is visible without reading build logs. See iriscode.co/account/insights.Uninstalling
Run Iris Code: Uninstall Build Hook. Only the Iris Code entry is removed. On Node projects, if no otherprebuild commands remain, the key is deleted rather than left empty.