The build gate requires Iris Code Pro.
Installing
Run Iris Code: Install Build Hook from the command palette. Iris Code works out what kind of project you have and adds the check for you. You do not need to edit any files by hand.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. If you already have aprebuildcommand, the Iris Code check runs first and your command still runs after it. - Everything else: adds an
iris-checktarget to your Makefile and makes thebuildoralltarget run it first. If there is no Makefile, Iris Code creates one with a build command that matches the project:go build ./...,cargo build,dotnet build, or, for Java,./gradlew build,gradle buildormvn testdepending on which wrapper and build files are present.
3
Runs on every build
If any file scores below
minHealthScore, the build stops with exit code 1 and lists the files that failed. Otherwise the build carries on as normal.Configuring the threshold
The threshold is the minimum health score a file must reach. Set it withminHealthScore in .irisconfig.json. It defaults to 70.
Analytics tracking
Each time the build gate runs, the result is recorded as a pass or fail in your account Analytics, so you can see how often it stops a build without reading build logs. See iriscode.co/account/analytics.Uninstalling
Run Iris Code: Uninstall Build Hook. Only the Iris Code entry is removed. On Node projects, if no otherprebuild commands remain, the prebuild key is deleted rather than left empty.