Linter, validator and auto-fixer for every ignore file: .gitignore, .dockerignore, .npmignore, .prettierignore, .eslintignore, .helmignore, .vercelignore, .claudeignore, .cursorignore, .aiderignore and 15 more. Finds duplicate and redundant rules; ships as a GitHub Action with SARIF output. Written in Crystal.
  • Crystal 92.4%
  • Shell 6.5%
  • Dockerfile 1%
  • Makefile 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Damián Búho 2c2da40cea
All checks were successful
published / release-tag (push) Successful in 2s
published / runner-is-ready (push) Successful in 5s
published / signing-is-ready (push) Successful in 10s
published / projectfile-is-valid (push) Successful in 4s
published / source-is-compliant (push) Successful in 6s
published / source-is-secure (push) Successful in 9s
published / documentation-passes-lint (push) Successful in 19s
published / projectfile-is-ok (push) Successful in 12s
published / binaries-are-built (amd64, linux) (push) Successful in 1m43s
published / source-passes-lint (push) Successful in 2m28s
published / image-is-built (amd64) (push) Successful in 1m49s
published / image-has-sbom (amd64) (push) Has been skipped
published / image-is-secure (amd64) (push) Successful in 34s
published / container-is-verified (amd64) (push) Successful in 1m41s
published / image-is-published (dockerhub) (push) Successful in 7s
published / image-is-published (kiota) (push) Successful in 12s
published / release-is-published (codeberg, damian-buho/ignorelint, https://codeberg.org) (push) Has been skipped
published / release-is-published (kiota, damian-buho/ignorelint, https://kiota.ch) (push) Has been skipped
published / release-notes-are-published (push) Has been skipped
published / published (push) Successful in 2s
build(workflows): fix parallel and M6E_NEAR_CACHE_SCHEME
2026-10-29 20:36:27 -03:00
.compose refactor: drop the d9t names left by the namespace move 2026-09-15 00:28:56 -03:00
.container fix(container): ship the pattern knowledge base and libyaml in the image build 2026-10-19 15:57:45 -03:00
.forgejo/workflows build(workflows): fix parallel and M6E_NEAR_CACHE_SCHEME 2026-10-29 20:36:27 -03:00
.github/workflows build(workflows): fix parallel and M6E_NEAR_CACHE_SCHEME 2026-10-29 20:36:27 -03:00
.makefile chore(makefile): sync m6e submodules 2026-10-29 19:45:35 -03:00
.scripts chore(corpus): list the findings of a repository list 2026-10-14 05:16:31 -03:00
docs chore(docs): regen features 2026-10-26 04:14:46 -03:00
knowledge feat: seed ignorelint hint patterns from gitignore corpus 2026-10-16 20:08:40 -03:00
LICENSES chore: init 2026-08-06 20:11:35 -03:00
spec fix(deps): bump athena-console to 0.5.0 and drop its workarounds 2026-10-19 16:43:45 -03:00
specifications fix(linter): match npm built-in includes as npm-packlist does 2026-10-14 05:18:53 -03:00
src fix(deps): bump athena-console to 0.5.0 and drop its workarounds 2026-10-19 16:43:45 -03:00
.ameba.yml chore(spec): regenerate formatter goldens from one shared fixture 2026-10-10 03:39:04 -03:00
.claudeignore chore: sorting for claudeignore 2026-09-13 12:48:20 -03:00
.containerignore build: ignore .worktrees (oci/docker) 2026-09-29 23:59:14 -03:00
.dockerignore chore(makefile): sync m6e submodules 2026-09-29 23:05:01 -03:00
.gitattributes chore: clean j2 from attributes 2026-09-14 00:36:29 -03:00
.gitignore build: ignore .worktrees 2026-09-29 17:37:43 -03:00
.gitmodules build: hard .gitmodules before big refactoring of m6e 2026-09-02 18:39:57 -03:00
.yamllint feat(forge): declare the account as forge org with a bare flatpath 2026-09-17 22:25:55 -03:00
action.yaml feat(action): expose output format and lint controls 2026-10-10 03:06:36 -03:00
AI_POLICY.md chore(docs): prevent user data from triggering textlint 2026-08-19 23:23:41 -03:00
CITATION.cff chore(version): 3.0.1 2026-10-24 04:37:54 -03:00
CODE_OF_CONDUCT.md docs: cleanup code of conduct 2026-08-18 02:17:34 -03:00
CODEOWNERS chore: init 2026-08-06 20:11:35 -03:00
CONTRIBUTING.md chore: regenerate contributing 2026-09-30 06:39:27 -03:00
Dockerfile fix(container): forward near-cache port and scheme to build stages 2026-10-29 19:32:39 -03:00
lefthook.yaml chore: regenerate lefthook.yaml 2026-09-29 22:28:44 -03:00
LICENSE chore: init 2026-08-06 20:11:35 -03:00
Makefile chore: init 2026-08-06 20:11:35 -03:00
MARKETPLACE.md feat(action): expose output format and lint controls 2026-10-10 03:06:36 -03:00
projectfile.yaml chore(version): 3.0.1 2026-10-24 04:37:54 -03:00
README.md chore(version): 3.0.1 2026-10-24 04:37:54 -03:00
SECURITY.md docs: clean up security.md (temporarily disable how to link) 2026-08-18 01:37:14 -03:00
shard.lock fix(deps): bump athena-console to 0.5.0 and drop its workarounds 2026-10-19 16:43:45 -03:00
shard.lock.license chore: init 2026-08-06 20:11:35 -03:00
shard.yml chore(version): 3.0.1 2026-10-24 04:37:54 -03:00
SUPPORT.md chore(docs): reenable codeberg 2026-09-18 14:36:04 -03:00

Español · Українська

logo

Ignorelint

Linter, validator and auto-fixer for every ignore file: .gitignore, .dockerignore, .npmignore, .prettierignore, .eslintignore, .helmignore, .vercelignore, .claudeignore, .cursorignore, .aiderignore and 15 more. Finds duplicate and redundant rules; ships as a GitHub Action with SARIF output. Written in Crystal.

It recognises 25 filenames across eight format-specific glob drivers and reports 25 diagnostic rules with ten output formats, from human and GNU to JUnit, Code Climate, Codacy, SonarQube and SARIF.

Stand with Ukraine Projectfile inside License Cosign PRs welcome REUSE compliance

Project status Last commit on kiota.ch Last commit on Codeberg Last commit on GitHub

Publish pipeline on GitHub Vulnerability audit on GitHub Dependency freshness on GitHub Analysis sweep on GitHub

Publish pipeline on kiota.ch Vulnerability audit on kiota.ch Dependency freshness on kiota.ch Analysis sweep on kiota.ch

Features

  • Autofix that preserves file meaning
  • Dead-rule detection against the live filesystem
  • Whole-tree discovery for monorepos
  • Output pipelines can parse
  • Policy lives in projectfile.yaml
  • Suppressions for intentional exceptions

It also inherits the features of B19 / Ubuntu — see Features for the full list.

What this provides

  • CI action damian-buho/ignorelint@3.0.1
  • Executable ignorelint — command ignorelint
  • Container image ghcr.io/damian-buho/ignorelint:latest
  • Container image damianbuho/ignorelint:latest

Installation

Container image

Pull the published container image:

Pull from GHCR — linux/amd64, linux/arm64

docker pull ghcr.io/damian-buho/ignorelint:latest
alias ignorelint='docker run --rm --user "$(id -u):$(id -g)" --group-add 0 --volume "$PWD:/app/ws" --workdir /app/ws ghcr.io/damian-buho/ignorelint:latest ignorelint'

Pull from DockerHub — linux/amd64

docker pull damianbuho/ignorelint:latest
alias ignorelint='docker run --rm --user "$(id -u):$(id -g)" --group-add 0 --volume "$PWD:/app/ws" --workdir /app/ws damianbuho/ignorelint:latest ignorelint'

Stable releases also publish X.Y.Z, X.Y and X tags — pull the precision you want to pin.

If the registries above are unreachable, pull from the origin instead:

Pull from Kiota — linux/amd64

docker pull kiota.ch/damian-buho/ignorelint:latest
alias ignorelint='docker run --rm --user "$(id -u):$(id -g)" --group-add 0 --volume "$PWD:/app/ws" --workdir /app/ws kiota.ch/damian-buho/ignorelint:latest ignorelint'

Then run it as if it were installed — the alias runs every example as written against the current directory:

ignorelint --help

Prebuilt binary

Download the prebuilt binary for your platform from GitHub Releases:

mkdir -p ~/.local/bin
curl --fail --location --output ~/.local/bin/ignorelint https://github.com/damian-buho/ignorelint/releases/latest/download/ignorelint-linux-$(uname -m)
chmod +x ~/.local/bin/ignorelint
~/.local/bin/ignorelint --help

Published for: linux/amd64, linux/arm64

To uninstall, delete that one file: rm ~/.local/bin/ignorelint.

Usage

Run it as a step in a GitHub Actions workflow:

- uses: damian-buho/ignorelint@3.0.1

The action takes these inputs:

Input Default Description
paths Newline-separated ignore files to lint. Empty enables auto-discovery.
recursive false Search subdirectories for ignore files (skips hidden dirs, node_modules, symlinks).
config_file Projectfile path read via pf-cli for the org.ignorelint policy subtree.
fail_on error Severity threshold that fails the job: none | error | warn | info
fix false Autofix deterministically fixable issues (workspace will be modified).
disabled_rules Comma-separated rule tags to skip entirely (e.g. IG-001,IG-020).
error Comma-separated rule tags to promote to error severity.
warning Comma-separated rule tags to set to warning severity.
info Comma-separated rule tags to demote to info severity.
format Extra report format (same values as --format). Empty emits none; sarif acts like sarif: true.
no_fail false Report every finding but always pass (beats fail_on).
diff false Preview autofix changes in the human report without writing (cannot combine with fix).
plain false Human report as one undecorated record per line.
quiet false Only errors in the human report; suppresses notices (cannot combine with verbose).
verbose false Show file discovery output on stderr (cannot combine with quiet).
disable_ignore_pragma false Parse suppression directives but apply none.
file_path_in_report Record this path instead of the linted one in machine-readable reports.
sarif false Also emit SARIF for github/codeql-action/upload-sarif.
upload_sarif false Upload the SARIF report to GitHub code scanning (implies sarif; needs security-events: write).
comment false Post the human report as a sticky comment on the triggering pull request.
version Image tag to pull (e.g. latest, 1.2.3). Empty follows the release the action is pinned to, else latest.
image Override the full image reference. Takes precedence over version.
github_token Token used to post PR comments. Defaults to the workflow github.token when empty.

ignorelint

$ ignorelint --help
Description:
  Linter for *ignore files (.gitignore, .dockerignore, .eslintignore, etc.)

Usage:
  ignorelint [options] [--] [<paths>...]

Arguments:
  paths                                          Files to lint; none discovers them in the current directory, a lone - reads stdin

Options:
      --fail-on=FAIL-ON                          Exit non-zero at this severity or worse (error|warn|info|none, default: error)
      --no-fail                                  Report every finding but always exit 0 (beats --fail-on)
      --plain                                    Human output as one undecorated path:line [CODE] severity: message record per line
      --file-path-in-report=FILE-PATH-IN-REPORT  Record this path instead of the linted one in machine-readable reports
      --format=FORMAT                            Output format (human|tty|gnu|json|checkstyle|junit|gitlab_codeclimate|codacy|sonarqube|sarif, default: human)
  -r, --recursive                                Search subdirectories for *ignore files (skips hidden dirs, node_modules, symlinks)
      --fix                                      Auto-fix deterministically fixable issues (IG-001,003,008,015,018,022,023,024)
      --diff                                     Preview auto-fix changes without writing (cannot combine with --fix)
      --stdin                                    Lint piped content instead of files (requires --file; a lone - path does the same)
      --file=FILE                                Filename for --stdin input (drives format detection)
      --disabled-rules=DISABLED-RULES            Skip rules entirely (comma-separated tags, e.g. IG-001,IG-020) (multiple values allowed)
      --error=ERROR                              Promote rules to error severity (comma-separated tags, e.g. IG-020) (multiple values allowed)
      --warning=WARNING                          Set rules to warning severity (comma-separated tags) (multiple values allowed)
      --info=INFO                                Demote rules to info severity (comma-separated tags; applied last) (multiple values allowed)
      --disable-ignore-pragma                    Parse suppression directives but apply none; IG-026 still lists them
      --config=CONFIG                            Projectfile read via pf-cli for the org.ignorelint policy subtree (default: ./projectfile.*)
  -h, --help                                     Display help for the given command. When no command is given display help for the ignorelint command
      --silent                                   Do not output any message
  -q, --quiet                                    Only errors are displayed. All other output is suppressed
  -V, --version                                  Display this application version
      --ansi|--no-ansi                           Force (or disable --no-ansi) ANSI output
  -n, --no-interaction                           Do not ask any interactive question
  -v|vv|vvv, --verbose                           Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
  When no path is given, discovers supported *ignore files in the current directory.
  Discovery and diagnostics go to stderr; stdout carries only the report.

  Environment variables:
    SHELL_VERBOSITY=1          Same as -v (-1 same as -q)
    IGNORELINT_FAIL_ON=LEVEL   Same as --fail-on (error|warn|info|none)
    IGNORELINT_NOFAIL=1        Same as --no-fail
    IGNORELINT_FORMAT=FORMAT   Same as --format
    IGNORELINT_FIX=1           Same as --fix
    IGNORELINT_RECURSIVE=1     Same as --recursive
    IGNORELINT_DISABLED_RULES=CODES Same as --disabled-rules
    IGNORELINT_OVERRIDE_ERROR=CODES Same as --error
    IGNORELINT_OVERRIDE_WARNING=CODES Same as --warning
    IGNORELINT_OVERRIDE_INFO=CODES Same as --info
    IGNORELINT_CONFIG=PATH     Same as --config
    IGNORELINT_PF_CLI_TIMEOUT=SECONDS Give pf-cli this long to answer (default 30)
    IGNORELINT_DISABLE_IGNORE_PRAGMA=1 Same as --disable-ignore-pragma
    IGNORELINT_FILE_PATH_IN_REPORT=PATH Same as --file-path-in-report
    NO_COLOR=1                 Disable colored output (also TERM=dumb)
    FORCE_COLOR=1              Color even when piped (--ansi and --no-ansi beat both)

Examples and every command’s help are in Usage.

Building

Clone the repository with its submodules:

git clone --recurse-submodules https://codeberg.org/damian-buho/ignorelint ignorelint && cd ignorelint

Build the binary from source into dist/:

make crystal-build

Build the container image locally:

make container-build

Run make with no arguments for the default target; run make help to list every target.

For the local dev loop, make dev-container brings up the dev-container.

Pipeline entry points:

  • make analyzed — Run the heavy analysis sweep (mutation testing, benchmarks)
  • make audited — Re-scan the pinned dependencies and published artifacts for new vulnerabilities
  • make check-outdated — Report every pinned dependency that lags upstream
  • make release-is-ready — Run the pseudo-CI pipeline locally — build, test and scan, without publishing

Documentation

Policies

License

This project is licensed under MIT — see the LICENSE file for details.