Skip to main content

rumk

[!WARNING] Alpha software under active development. Rumk is useful today, but its rules, CLI, configuration, diagnostics, and autofixes may change between 0.0.x releases. Pin the version in automation and review autofix diffs before committing them.

A fast Makefile linter written in Rust, built as the Makefile sibling of Rumdl.

Rumk is currently alpha software. Its CLI, configuration model, diagnostics, fixing behavior, and exit codes intentionally follow Rumdl so existing Rumdl users can reuse their workflow.

Features

  • Lints individual Makefiles or entire directory trees
  • Safely fixes recipe indentation, style-aware .PHONY declarations, and recursive Make invocations
  • Parses continued logical statements and nested $(...)/${...} expressions
  • Models GNU Make assignment flavors, static patterns, target-specific variables, includes, conditionals, define blocks, custom recipe prefixes, and .ONESHELL
  • Builds semantic indexes for variables, references, targets, dependencies, and includes
  • Safely evaluates statically knowable variables and conditionals without running recipes, shell commands, or side-effecting Make functions
  • Supports GNU substitution references plus common word, path, list, and lazy logical functions
  • Resolves expanded include graphs and reports cross-file findings at their real source paths
  • Preserves LF/CRLF line endings and final newlines during fixes
  • Uses Rumdl-style check, fmt, rule, config, init, and explain commands
  • Discovers .rumk.toml upward through the project tree
  • Respects .gitignore by default
  • Supports rule selection, file globs, per-file ignores, severities, and fix allowlists
  • Emits text, flat JSON, and GitHub Actions annotations

Installation

cargo install rumk --locked --version 0.0.6

Or install the native executable from PyPI with a Python tool manager:

uv tool install rumk==0.0.6
# or
pipx install rumk==0.0.6

Rumk is alpha-stage 0.0.x software, so installation names the version explicitly. Release archives and Python wheels cover Linux, macOS, and Windows. GitHub release assets include SHA-256 checksums.

Quick start

# Check Makefiles below the current directory
rumk check

# Check specific files or directories
rumk check Makefile build/

# Apply safe fixes, then fail only if violations remain
rumk check --fix

# Format files with formatter-style exit behavior
rumk fmt

# Preview formatting changes
rumk fmt --diff

# Fail when formatting changes are required
rumk fmt --check

# Inspect rules and effective configuration
rumk rule
rumk rule MK101
rumk config
rumk config get MK101.line-length
rumk config file

Run rumk --help or rumk <command> --help for all options.

Configuration

Create a .rumk.toml file manually or run rumk init:

[global]
dialect = "gnu"
respect-gitignore = true
exclude = ["vendor/**", "generated/**"]
disable = ["MK101"]
fixable = ["MK001"]
include-paths = ["mk"]
predefined-variables = { FROM_CLI = "yes" }
entry-targets = ["all"]

[MK101]
enabled = true
severity = "warning"
line-length = 100
ignore-comments = true
ignore-recipes = true

[MK102]
enabled = true
style = "upper-case"

[MK201]
placement = "auto"

[per-file-ignores]
"vendor/**/*.mk" = ["MK202"]

Configuration discovery checks .rumk.toml, rumk.toml, and .config/rumk.toml while walking upward, stopping at a Git project boundary. Use --config <PATH> for an explicit file or --no-config/--isolated for built-in defaults.

Configurations can inherit another file with extends = "../.rumk.toml"; nested tables are merged, child values win, relative paths resolve from the extending file, and cycles are rejected.

Rules can be suppressed in Make comments without changing project configuration:

# rumk-disable MK202
INSTALL_PREFIX := /usr/local
# rumk-enable MK202

# rumk-disable-next-line MK201
clean:
	rm -rf build

rumk-disable, rumk-enable, rumk-disable-line, and rumk-disable-next-line are supported. Recipe shell comments are not interpreted as Rumk directives.

The original Rumk [rules] and [ignore] configuration sections remain accepted for migration.

include-paths models GNU Make's -I search directories and resolves relative entries from the configuration directory. predefined-variables supplies command-line-style values to safe evaluation and names expected by opt-in rule MK208. That rule intentionally ignores references inside recipes and deferred macro bodies, where command-line parameters and shell values are normal. entry-targets supplies the roots for opt-in reachability rule MK209; the rule stays silent without explicit roots because any Make target may be invoked directly from the command line.

Rule and file selection

Rumk follows Rumdl's selection vocabulary:

rumk check --enable MK001,MK002 .
rumk check --disable MK101 .
rumk check --extend-enable MK202 .
rumk check --exclude "vendor/**,generated/**" .
rumk check --include "src/**" .
rumk check --respect-gitignore=false .
rumk fmt --fixable MK001 .

Exit codes

  • 0: success, or all selected violations were fixed
  • 1: lint violations, or fmt --check found required changes
  • 2: configuration, file access, or other tool error

rumk check fails on any diagnostic by default. Use --fail-on warning, --fail-on error, or --fail-on never to change that policy. rumk fmt exits successfully after formatting even if non-fixable lint diagnostics remain.

Output

Text diagnostics follow Rumdl's familiar form:

Makefile:2:1: [MK001] Recipe must be indented with tab, not spaces [*]

JSON output is a flat array collected across all files:

rumk check --output-format json .
[
  {
    "file": "Makefile",
    "line": 2,
    "column": 1,
    "end_line": 2,
    "end_column": 1,
    "rule": "MK001",
    "message": "Recipe must be indented with tab, not spaces",
    "severity": "error",
    "fixable": true,
    "fix": {
      "range": { "start": 7, "end": 11 },
      "replacement": "\t"
    }
  }
]

The legacy --format spelling remains an alias for --output-format.

Rules

Rules marked default run without configuration. Each rule page documents its behavior, configuration, fixes, edge cases, and the GNU Make, POSIX, or Rumk convention on which it is based.

Syntax

  • MK001 — Recipes must use tab indentation (default, fixable)
  • MK002 — Invalid variable syntax (default)
  • MK003 — Malformed conditional structure (default)
  • MK004 — Targets must not mix single- and double-colon declarations (default)
  • MK005 — GNU Make special targets must stand alone (default)

Style

  • MK101 — Declarative line exceeds the configured maximum length; comments and recipes are ignored by default (default)
  • MK102 — Variable naming convention
  • MK103 — Target naming convention

Best practices

  • MK201 — Conventional non-file targets should be .PHONY; fixes consolidate canonical groups, preserve per-section style, and wrap long declarations (default, fixable)
  • MK202 — Avoid hardcoded absolute paths (opt-in)
  • MK203 — Recursive Make invocations should use $(MAKE) (default, fixable)
  • MK204 — Concrete targets should not declare multiple single-colon recipes (default)
  • MK205 — Explicit target dependencies must not form cycles (default)
  • MK206 — Required static includes must resolve (default)
  • MK207 — Static Makefile includes must not form cycles (default)
  • MK208 — Static graph-level variable references must resolve (opt-in)
  • MK209 — Targets must be reachable from explicitly configured entries (opt-in)
  • MK210 — Explain include expressions blocked by safe evaluation (opt-in)

Development

cargo test --all-targets --all-features
cargo clippy --all-targets --all-features -- -D warnings
cargo fmt --all -- --check
cargo build --release
make check-gnu-fixtures

The product-level compatibility contract is documented in docs/rumdl-compatibility.md.

Contributing

See CONTRIBUTING.md.

License

MIT. See LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rumk-0.0.6.tar.gz (90.6 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

rumk-0.0.6-py3-none-win_amd64.whl (1.5 MB view details)

Uploaded Python 3Windows x86-64

rumk-0.0.6-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

rumk-0.0.6-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.4 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

rumk-0.0.6-py3-none-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

rumk-0.0.6-py3-none-macosx_10_12_x86_64.whl (1.5 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file rumk-0.0.6.tar.gz.

File metadata

  • Download URL: rumk-0.0.6.tar.gz
  • Upload date:
  • Size: 90.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for rumk-0.0.6.tar.gz
Algorithm Hash digest
SHA256 3b91bbbdd7f669faec3d0157439a8a508ba09cf92d311a7dda0f0460668ac63f
MD5 7efa01752b83290d65895cd98d38fb4e
BLAKE2b-256 bae278b5295613ba49480120d6b1b3bf16b2e18986d52af50bef48585fd7c655

See more details on using hashes here.

Provenance

The following attestation bundles were made for rumk-0.0.6.tar.gz:

Publisher: release.yml on rvben/rumk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rumk-0.0.6-py3-none-win_amd64.whl.

File metadata

  • Download URL: rumk-0.0.6-py3-none-win_amd64.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for rumk-0.0.6-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 a13088d4325349f517e7d2dbbeb25b824d96e58dc80d51ffdb752005dc5c40d0
MD5 e4ec19add5f45831ff085e8eb7294af6
BLAKE2b-256 a0ba373212d9c24b4ae48e006a806b0eaa34e31751ac911c7a9025b23c781c19

See more details on using hashes here.

Provenance

The following attestation bundles were made for rumk-0.0.6-py3-none-win_amd64.whl:

Publisher: release.yml on rvben/rumk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rumk-0.0.6-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rumk-0.0.6-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d108557c1c41d646331dbe3fd08c7d2f44ad2eb6ac991e5a4f740f1b0f421512
MD5 3093309f9f53e9ebaa0c3015df6e5d3a
BLAKE2b-256 3adebe023d7da2332d5d08f22abbdbcefbe514a736c481011943b5e670a20d5f

See more details on using hashes here.

Provenance

The following attestation bundles were made for rumk-0.0.6-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on rvben/rumk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rumk-0.0.6-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for rumk-0.0.6-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e538066a92f6d23f495098f3bb8b9f3288a47672483bddd43bfa1dc907acafb3
MD5 5421a1ded92ec6d9ea96814a396367d8
BLAKE2b-256 b3c44556fc5e7643167c1dd3992f35262e1c7f1c827e401815e0423394aaffe4

See more details on using hashes here.

Provenance

The following attestation bundles were made for rumk-0.0.6-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on rvben/rumk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rumk-0.0.6-py3-none-macosx_11_0_arm64.whl.

File metadata

  • Download URL: rumk-0.0.6-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: Python 3, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for rumk-0.0.6-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0e868eef5482a1def7985e742a17081d9f33cb613bc504c4dcdaae571ae2b9ac
MD5 a61f901537da9486cf984d9c06fade19
BLAKE2b-256 c4236b80fdd2d0909639ec31c19f6e344208e0664011795a7b34fa2606fbd6fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for rumk-0.0.6-py3-none-macosx_11_0_arm64.whl:

Publisher: release.yml on rvben/rumk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rumk-0.0.6-py3-none-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: rumk-0.0.6-py3-none-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: Python 3, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for rumk-0.0.6-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 be87cc504d497295fad38b1669cb4f85dcab1c3b4592c00c64407f00dd8693de
MD5 630f7986f26bb57e1d294c6796de911b
BLAKE2b-256 9e58c106afeeebc29255d6533b2addbbaf4c4c6153a73be172710f57d5e6f5f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for rumk-0.0.6-py3-none-macosx_10_12_x86_64.whl:

Publisher: release.yml on rvben/rumk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.0.7

6 files

This release

0.0.6 This release

6 files

0.0.5

6 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page