DonIsaac/zlint

A linter for the Zig programming language

309

stars

468

commits

Zig

primary language

Sep 6, 2026

updated

donisaac.github.io/zlint
linters
zig

README

⚡️ ZLint

codecov CI Discord

An opinionated linter for the Zig programming language.

✨ Features

  • 🔍 Custom Analysis. ZLint has its own semantic analyzer, heavily inspired by the Oxc project, that is completely separate from the Zig compiler. This means that ZLint still checks and understands code that may otherwise be ignored by Zig due to dead code elimination.
  • ⚡️ Fast. Designed from the ground-up to be highly performant, ZLint typically takes a few hundred milliseconds to lint large projects.
  • 💡 Understandable. Error messages are pretty, detailed, and easy to understand. Most rules come with explanations on how to fix them and what exactly is wrong. diagnostic example

📦 Installation

Pre-built binaries for Windows, MacOS, and Linux on x64 and aarch64 are available for each release.

Linux/macOS

curl -fsSL https://raw.githubusercontent.com/DonIsaac/zlint/refs/heads/main/tasks/install.sh | bash

Windows

Invoke-WebRequest -Uri "https://raw.githubusercontent.com/DonIsaac/zlint/refs/heads/main/tasks/install.ps1" | Invoke-Expression

Updating

Direct binary installations can be updated in place:

zlint update

🔨 Building from Source

Clone this repo and compile the project with Zig.

zig build --release=safe

⚡️ Lint Rules

All lints and what they do can be found here.

⚙️ Configuration

Create a zlint.json file in the same directory as build.zig. This disables all default rules, only enabling the ones you choose.

{
  "rules": {
    "unsafe-undefined": "error",
    "homeless-try": "warn"
  }
}

ZLint also supports ESLint-like disable directives to turn off some or all rules for a specific file.

// zlint-disable unsafe-undefined -- We need to come back and fix this later
const x: i32 = undefined;

🙋‍♂️ Contributing

If you have any rule ideas, please add them to the rule ideas board.

Interested in contributing code? Check out the contributing guide.

Contributors

DonIsaac

456 commits

felipeasimos

3 commits

incidere

1 commits

DonIsaac/zlint

A linter for the Zig programming language

309

stars

468

commits

Zig

primary language

Sep 6, 2026

updated

donisaac.github.io/zlint
linters
zig

README

⚡️ ZLint

codecov CI Discord

An opinionated linter for the Zig programming language.

✨ Features

  • 🔍 Custom Analysis. ZLint has its own semantic analyzer, heavily inspired by the Oxc project, that is completely separate from the Zig compiler. This means that ZLint still checks and understands code that may otherwise be ignored by Zig due to dead code elimination.
  • ⚡️ Fast. Designed from the ground-up to be highly performant, ZLint typically takes a few hundred milliseconds to lint large projects.
  • 💡 Understandable. Error messages are pretty, detailed, and easy to understand. Most rules come with explanations on how to fix them and what exactly is wrong. diagnostic example

📦 Installation

Pre-built binaries for Windows, MacOS, and Linux on x64 and aarch64 are available for each release.

Linux/macOS

curl -fsSL https://raw.githubusercontent.com/DonIsaac/zlint/refs/heads/main/tasks/install.sh | bash

Windows

Invoke-WebRequest -Uri "https://raw.githubusercontent.com/DonIsaac/zlint/refs/heads/main/tasks/install.ps1" | Invoke-Expression

Updating

Direct binary installations can be updated in place:

zlint update

🔨 Building from Source

Clone this repo and compile the project with Zig.

zig build --release=safe

⚡️ Lint Rules

All lints and what they do can be found here.

⚙️ Configuration

Create a zlint.json file in the same directory as build.zig. This disables all default rules, only enabling the ones you choose.

{
  "rules": {
    "unsafe-undefined": "error",
    "homeless-try": "warn"
  }
}

ZLint also supports ESLint-like disable directives to turn off some or all rules for a specific file.

// zlint-disable unsafe-undefined -- We need to come back and fix this later
const x: i32 = undefined;

🙋‍♂️ Contributing

If you have any rule ideas, please add them to the rule ideas board.

Interested in contributing code? Check out the contributing guide.

Contributors

DonIsaac

456 commits

felipeasimos

3 commits

incidere

1 commits

Languages

Zig

88.0%

Python

4.8%

TypeScript

3.3%

MDX

2.4%