Skip to main content
If you use Neovim, Helix or another editor without an Iris Code extension, you can still see Iris Code’s findings as you type. A language server is a program that checks code and reports to the editor through a shared protocol called LSP, which most editors support. The iris-lsp language server brings Iris Code to those editors. It runs on your machine and needs neither Node.js nor a network connection to analyse your code.

Installing

Download the program for your platform from the releases page, make it executable, and put it in a folder on your PATH so your editor can find it.

Verifying the download

Every release includes a SHA256SUMS file, a list of fingerprints for the downloads. Check the file you downloaded against it before you put it on your PATH, to confirm it arrived complete and unchanged.
On macOS the command is shasum -a 256 --check --ignore-missing SHA256SUMS.
The macOS programs are not notarised by Apple, so macOS (through Gatekeeper) marks them as quarantined when downloaded and refuses to run them. Once you have checked the fingerprint, clear the mark with xattr -d com.apple.quarantine ./iris-lsp.

Configuration

Neovim

Neovim 0.11 and newer can configure a language server without any plugin:
jproperties is in the list because Iris Code checks .properties files for passwords and keys committed by mistake, which is the only thing it checks in them. Remove it if you would rather not run the server on those files. Iris Code adds to your existing language server rather than replacing it, so turn it on alongside whichever one already handles your language. Neovim runs several at once and combines their diagnostics, the warnings shown in the code.

Helix

In languages.toml:
Add "iris" to the language-servers list of every language you want covered. Helix also runs several servers per language, so your existing one stays in place.

What you get

These features come from the language server itself, so they work in any editor that supports LSP:
  • inline diagnostics for health, complexity, duplication, naming, hardcoded secrets and the nine security smell categories
  • the file’s health score on hover
  • code lenses on long functions, where the client renders them
  • quick fixes that scaffold an iris-ignore suppression with its required reason
  • filename-convention renames
  • configuration read from the same .irisconfig.json, reloaded when that file changes
The panels are not available here. Workspace and folder scans, the Findings and TODO tabs, Review My Changes, and the suppressions, duplicates, naming, dependency and trend tables are all screens that an editor extension builds, and LSP has no way to show them. The support matrix shows which editor has what. You can still open two of those screens from a terminal, in your browser:
  • iris-lsp --panel <dir> serves the full Iris Code panel as a local web page and prints its address.
  • iris-lsp --dashboard <dir> serves a one-page summary of the workspace.
Both are only reachable from your own machine (127.0.0.1), at an address with a random path that changes each run.

Signing in

One sign-in covers the language server, the CLI (the iris terminal commands) and the JetBrains plugin. All three read ~/.iris/credentials.
--licence-status errs on the safe side: if it cannot work out your licence, it reports that you do not have Pro rather than assuming you do.

Enforcement without Node

The gate is the pass-or-fail check against your configured limits. It is built into the program, so a repository can be checked on a machine with no Node.js installed:
It exits with 0 on a pass and 1 on a failure, which is all a git hook or a CI step needs to allow or stop a change. See the git hook and CI enforcement for how that fits into a workflow.

Free and Pro

Diagnostics, hover, quick fixes and renames are free. The gate, and the Pro rules behind it, need a licence. Without one, --check reports what it can but does not apply the Pro limits. See Pro for the split.