---
title: Rules and suppressions
description: Read Zsh Lint diagnostics and suppress one intentional finding safely.
canonical_url: https://wiki.zshell.dev/community/zsh_lint/zsh-lint-rules-and-suppressions
markdown_url: https://wiki.zshell.dev/community/zsh_lint/zsh-lint-rules-and-suppressions/index.md
locale: en
source_path: community/04_zsh_lint/04_rules_and_suppressions.mdx
---

<!-- Generated from the canonical Z-Shell Wiki build. The linked human-facing page remains the editorial source of truth. -->

# Rules and suppressions

<a id="read-a-diagnostic"></a>

## Read a diagnostic

Human-readable output uses this shape:

```text
path:line:column: [rule-id] message
```

For example:

```text
lib/render.zsh:8:10: [quoting/unquoted-var] Variable expansion should be double-quoted
```

The rule ID is stable machine-facing identity. Browse the [published rule reference](https://wiki.zshell.dev/community/zsh_lint/zsh-lint-rule-reference/index.md) for each rule's purpose, examples, severity, and suppression form.

Warnings and errors make the command exit 1. Info and Hint findings are still reported but do not make the command fail.

<a id="fix-first-suppress-only-when-intentional"></a>

## Fix first, suppress only when intentional

A suppression names the exact rule and applies to one source line:

```zsh
print $words  # zsh-lint disable=quoting/unquoted-var -- intentional word splitting
```

You can also put it on the preceding comment line. It then applies to the next non-comment, non-blank source line:

```zsh
# zsh-lint disable=quoting/unquoted-var -- intentional word splitting
print $words
```

Multiple rule IDs are comma-separated without spaces:

```zsh
# zsh-lint disable=rule/one,rule/two -- compatibility boundary
command_to_review
```

There is no blanket, block-wide, or file-wide disable in the published contract. A malformed directive reports `meta/malformed-suppression`. A rule ID that suppresses nothing reports `meta/unused-suppression`, which helps keep exceptions from becoming stale.

Use a short reason even when it is optional. The reason lets the next reviewer decide whether the exception is still valid.
