Skip to main content
Install it once and every 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 prebuild entry to package.json, chaining safely before any existing prebuild command.
  • Everything else: writes an iris-check target into your Makefile and wires it as a prerequisite of the build or all target. Where the Makefile has to be created, its build command matches the project: go build ./..., cargo build, dotnet build, or ./gradlew build, gradle build and mvn test for 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.
Every file is checked before the build fails, so the complete list appears at once rather than one problem per run.

Configuring the threshold

Set minHealthScore in .irisconfig.json to control the minimum acceptable score. It defaults to 70.
On Node projects, your existing prebuild command is preserved, and uninstalling restores the original state.

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 other prebuild commands remain, the key is deleted rather than left empty.