rumk 0.0.5__py3-none-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
Binary file
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: rumk
|
|
3
|
+
Version: 0.0.5
|
|
4
|
+
Classifier: Development Status :: 3 - Alpha
|
|
5
|
+
Classifier: Environment :: Console
|
|
6
|
+
Classifier: Intended Audience :: Developers
|
|
7
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
8
|
+
Classifier: Operating System :: MacOS
|
|
9
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
10
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Rust
|
|
13
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
14
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
15
|
+
License-File: LICENSE
|
|
16
|
+
Summary: A fast linter for Makefiles
|
|
17
|
+
Author: Ruben Jongejan
|
|
18
|
+
License: MIT
|
|
19
|
+
Requires-Python: >=3.8
|
|
20
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
21
|
+
Project-URL: Documentation, https://github.com/rvben/rumk#readme
|
|
22
|
+
Project-URL: Homepage, https://github.com/rvben/rumk
|
|
23
|
+
Project-URL: Issues, https://github.com/rvben/rumk/issues
|
|
24
|
+
Project-URL: Repository, https://github.com/rvben/rumk.git
|
|
25
|
+
|
|
26
|
+
# rumk
|
|
27
|
+
|
|
28
|
+
A fast Makefile linter written in Rust, built as the Makefile sibling of
|
|
29
|
+
[Rumdl](https://github.com/rvben/rumdl).
|
|
30
|
+
|
|
31
|
+
Rumk is currently alpha software. Its CLI, configuration model, diagnostics, fixing behavior,
|
|
32
|
+
and exit codes intentionally follow Rumdl so existing Rumdl users can reuse their workflow.
|
|
33
|
+
|
|
34
|
+
## Features
|
|
35
|
+
|
|
36
|
+
- Lints individual Makefiles or entire directory trees
|
|
37
|
+
- Safely fixes recipe indentation, style-aware `.PHONY` declarations, and recursive Make
|
|
38
|
+
invocations
|
|
39
|
+
- Parses continued logical statements and nested `$(...)`/`${...}` expressions
|
|
40
|
+
- Models GNU Make assignment flavors, static patterns, target-specific variables, includes,
|
|
41
|
+
conditionals, `define` blocks, custom recipe prefixes, and `.ONESHELL`
|
|
42
|
+
- Builds semantic indexes for variables, references, targets, dependencies, and includes
|
|
43
|
+
- Safely evaluates statically knowable variables and conditionals without running recipes,
|
|
44
|
+
shell commands, or side-effecting Make functions
|
|
45
|
+
- Supports GNU substitution references plus common word, path, list, and lazy logical functions
|
|
46
|
+
- Resolves expanded include graphs and reports cross-file findings at their real source paths
|
|
47
|
+
- Preserves LF/CRLF line endings and final newlines during fixes
|
|
48
|
+
- Uses Rumdl-style `check`, `fmt`, `rule`, `config`, `init`, and `explain` commands
|
|
49
|
+
- Discovers `.rumk.toml` upward through the project tree
|
|
50
|
+
- Respects `.gitignore` by default
|
|
51
|
+
- Supports rule selection, file globs, per-file ignores, severities, and fix allowlists
|
|
52
|
+
- Emits text, flat JSON, and GitHub Actions annotations
|
|
53
|
+
|
|
54
|
+
## Installation
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
cargo install rumk --locked --version 0.0.5
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Or install the native executable from PyPI with a Python tool manager:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
uv tool install rumk==0.0.5
|
|
64
|
+
# or
|
|
65
|
+
pipx install rumk==0.0.5
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Rumk is alpha-stage `0.0.x` software, so installation names the version explicitly. Release
|
|
69
|
+
archives and Python wheels cover Linux, macOS, and Windows. GitHub release assets include SHA-256
|
|
70
|
+
checksums and build-provenance attestations.
|
|
71
|
+
|
|
72
|
+
## Quick start
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
# Check Makefiles below the current directory
|
|
76
|
+
rumk check
|
|
77
|
+
|
|
78
|
+
# Check specific files or directories
|
|
79
|
+
rumk check Makefile build/
|
|
80
|
+
|
|
81
|
+
# Apply safe fixes, then fail only if violations remain
|
|
82
|
+
rumk check --fix
|
|
83
|
+
|
|
84
|
+
# Format files with formatter-style exit behavior
|
|
85
|
+
rumk fmt
|
|
86
|
+
|
|
87
|
+
# Preview formatting changes
|
|
88
|
+
rumk fmt --diff
|
|
89
|
+
|
|
90
|
+
# Fail when formatting changes are required
|
|
91
|
+
rumk fmt --check
|
|
92
|
+
|
|
93
|
+
# Inspect rules and effective configuration
|
|
94
|
+
rumk rule
|
|
95
|
+
rumk rule MK101
|
|
96
|
+
rumk config
|
|
97
|
+
rumk config get MK101.line-length
|
|
98
|
+
rumk config file
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Run `rumk --help` or `rumk <command> --help` for all options.
|
|
102
|
+
|
|
103
|
+
## Configuration
|
|
104
|
+
|
|
105
|
+
Create a `.rumk.toml` file manually or run `rumk init`:
|
|
106
|
+
|
|
107
|
+
```toml
|
|
108
|
+
[global]
|
|
109
|
+
dialect = "gnu"
|
|
110
|
+
respect-gitignore = true
|
|
111
|
+
exclude = ["vendor/**", "generated/**"]
|
|
112
|
+
disable = ["MK101"]
|
|
113
|
+
fixable = ["MK001"]
|
|
114
|
+
include-paths = ["mk"]
|
|
115
|
+
predefined-variables = { FROM_CLI = "yes" }
|
|
116
|
+
entry-targets = ["all"]
|
|
117
|
+
|
|
118
|
+
[MK101]
|
|
119
|
+
enabled = true
|
|
120
|
+
severity = "warning"
|
|
121
|
+
line-length = 100
|
|
122
|
+
ignore-comments = true
|
|
123
|
+
ignore-recipes = true
|
|
124
|
+
|
|
125
|
+
[MK102]
|
|
126
|
+
enabled = true
|
|
127
|
+
style = "upper-case"
|
|
128
|
+
|
|
129
|
+
[MK201]
|
|
130
|
+
placement = "auto"
|
|
131
|
+
|
|
132
|
+
[per-file-ignores]
|
|
133
|
+
"vendor/**/*.mk" = ["MK202"]
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Configuration discovery checks `.rumk.toml`, `rumk.toml`, and `.config/rumk.toml` while walking
|
|
137
|
+
upward, stopping at a Git project boundary. Use `--config <PATH>` for an explicit file or
|
|
138
|
+
`--no-config`/`--isolated` for built-in defaults.
|
|
139
|
+
|
|
140
|
+
Configurations can inherit another file with `extends = "../.rumk.toml"`; nested tables are
|
|
141
|
+
merged, child values win, relative paths resolve from the extending file, and cycles are rejected.
|
|
142
|
+
|
|
143
|
+
Rules can be suppressed in Make comments without changing project configuration:
|
|
144
|
+
|
|
145
|
+
```makefile
|
|
146
|
+
# rumk-disable MK202
|
|
147
|
+
INSTALL_PREFIX := /usr/local
|
|
148
|
+
# rumk-enable MK202
|
|
149
|
+
|
|
150
|
+
# rumk-disable-next-line MK201
|
|
151
|
+
clean:
|
|
152
|
+
rm -rf build
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
`rumk-disable`, `rumk-enable`, `rumk-disable-line`, and `rumk-disable-next-line` are supported.
|
|
156
|
+
Recipe shell comments are not interpreted as Rumk directives.
|
|
157
|
+
|
|
158
|
+
The original Rumk `[rules]` and `[ignore]` configuration sections remain accepted for migration.
|
|
159
|
+
|
|
160
|
+
`include-paths` models GNU Make's `-I` search directories and resolves relative entries from the
|
|
161
|
+
configuration directory. `predefined-variables` supplies command-line-style values to safe
|
|
162
|
+
evaluation and names expected by opt-in rule `MK208`. That rule intentionally ignores references
|
|
163
|
+
inside recipes and deferred macro bodies, where command-line parameters and shell values are
|
|
164
|
+
normal. `entry-targets` supplies the roots for opt-in reachability rule `MK209`; the rule stays
|
|
165
|
+
silent without explicit roots because any Make target may be invoked directly from the command
|
|
166
|
+
line.
|
|
167
|
+
|
|
168
|
+
### Rule and file selection
|
|
169
|
+
|
|
170
|
+
Rumk follows Rumdl's selection vocabulary:
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
rumk check --enable MK001,MK002 .
|
|
174
|
+
rumk check --disable MK101 .
|
|
175
|
+
rumk check --extend-enable MK202 .
|
|
176
|
+
rumk check --exclude "vendor/**,generated/**" .
|
|
177
|
+
rumk check --include "src/**" .
|
|
178
|
+
rumk check --respect-gitignore=false .
|
|
179
|
+
rumk fmt --fixable MK001 .
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Exit codes
|
|
183
|
+
|
|
184
|
+
- `0`: success, or all selected violations were fixed
|
|
185
|
+
- `1`: lint violations, or `fmt --check` found required changes
|
|
186
|
+
- `2`: configuration, file access, or other tool error
|
|
187
|
+
|
|
188
|
+
`rumk check` fails on any diagnostic by default. Use `--fail-on warning`, `--fail-on error`, or
|
|
189
|
+
`--fail-on never` to change that policy. `rumk fmt` exits successfully after formatting even if
|
|
190
|
+
non-fixable lint diagnostics remain.
|
|
191
|
+
|
|
192
|
+
## Output
|
|
193
|
+
|
|
194
|
+
Text diagnostics follow Rumdl's familiar form:
|
|
195
|
+
|
|
196
|
+
```text
|
|
197
|
+
Makefile:2:1: [MK001] Recipe must be indented with tab, not spaces [*]
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
JSON output is a flat array collected across all files:
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
rumk check --output-format json .
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
```json
|
|
207
|
+
[
|
|
208
|
+
{
|
|
209
|
+
"file": "Makefile",
|
|
210
|
+
"line": 2,
|
|
211
|
+
"column": 1,
|
|
212
|
+
"end_line": 2,
|
|
213
|
+
"end_column": 1,
|
|
214
|
+
"rule": "MK001",
|
|
215
|
+
"message": "Recipe must be indented with tab, not spaces",
|
|
216
|
+
"severity": "error",
|
|
217
|
+
"fixable": true,
|
|
218
|
+
"fix": {
|
|
219
|
+
"range": { "start": 7, "end": 11 },
|
|
220
|
+
"replacement": "\t"
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
]
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
The legacy `--format` spelling remains an alias for `--output-format`.
|
|
227
|
+
|
|
228
|
+
## Rules
|
|
229
|
+
|
|
230
|
+
Rules marked **default** run without configuration.
|
|
231
|
+
Each rule page documents its behavior, configuration, fixes, edge cases, and
|
|
232
|
+
the GNU Make, POSIX, or Rumk convention on which it is based.
|
|
233
|
+
|
|
234
|
+
### Syntax
|
|
235
|
+
|
|
236
|
+
- [`MK001`](https://github.com/rvben/rumk/blob/main/docs/mk001.md) — Recipes must use tab
|
|
237
|
+
indentation (**default**, fixable)
|
|
238
|
+
- [`MK002`](https://github.com/rvben/rumk/blob/main/docs/mk002.md) — Invalid variable syntax
|
|
239
|
+
(**default**)
|
|
240
|
+
- [`MK003`](https://github.com/rvben/rumk/blob/main/docs/mk003.md) — Malformed conditional
|
|
241
|
+
structure (**default**)
|
|
242
|
+
- [`MK004`](https://github.com/rvben/rumk/blob/main/docs/mk004.md) — Targets must not mix
|
|
243
|
+
single- and double-colon declarations (**default**)
|
|
244
|
+
- [`MK005`](https://github.com/rvben/rumk/blob/main/docs/mk005.md) — GNU Make special targets
|
|
245
|
+
must stand alone (**default**)
|
|
246
|
+
|
|
247
|
+
### Style
|
|
248
|
+
|
|
249
|
+
- [`MK101`](https://github.com/rvben/rumk/blob/main/docs/mk101.md) — Declarative line exceeds
|
|
250
|
+
the configured maximum length; comments and recipes are ignored by default (**default**)
|
|
251
|
+
- [`MK102`](https://github.com/rvben/rumk/blob/main/docs/mk102.md) — Variable naming convention
|
|
252
|
+
- [`MK103`](https://github.com/rvben/rumk/blob/main/docs/mk103.md) — Target naming convention
|
|
253
|
+
|
|
254
|
+
### Best practices
|
|
255
|
+
|
|
256
|
+
- [`MK201`](https://github.com/rvben/rumk/blob/main/docs/mk201.md) — Conventional
|
|
257
|
+
non-file targets should be `.PHONY`;
|
|
258
|
+
fixes consolidate canonical groups, preserve per-section style, and wrap long
|
|
259
|
+
declarations (**default**, fixable)
|
|
260
|
+
- [`MK202`](https://github.com/rvben/rumk/blob/main/docs/mk202.md) — Avoid hardcoded absolute
|
|
261
|
+
paths (opt-in)
|
|
262
|
+
- [`MK203`](https://github.com/rvben/rumk/blob/main/docs/mk203.md) — Recursive Make invocations
|
|
263
|
+
should use `$(MAKE)` (**default**, fixable)
|
|
264
|
+
- [`MK204`](https://github.com/rvben/rumk/blob/main/docs/mk204.md) — Concrete targets should not
|
|
265
|
+
declare multiple single-colon recipes (**default**)
|
|
266
|
+
- [`MK205`](https://github.com/rvben/rumk/blob/main/docs/mk205.md) — Explicit target dependencies
|
|
267
|
+
must not form cycles (**default**)
|
|
268
|
+
- [`MK206`](https://github.com/rvben/rumk/blob/main/docs/mk206.md) — Required static includes must
|
|
269
|
+
resolve (**default**)
|
|
270
|
+
- [`MK207`](https://github.com/rvben/rumk/blob/main/docs/mk207.md) — Static Makefile includes must
|
|
271
|
+
not form cycles (**default**)
|
|
272
|
+
- [`MK208`](https://github.com/rvben/rumk/blob/main/docs/mk208.md) — Static graph-level variable
|
|
273
|
+
references must resolve (opt-in)
|
|
274
|
+
- [`MK209`](https://github.com/rvben/rumk/blob/main/docs/mk209.md) — Targets must be reachable
|
|
275
|
+
from explicitly configured entries (opt-in)
|
|
276
|
+
- [`MK210`](https://github.com/rvben/rumk/blob/main/docs/mk210.md) — Explain include expressions
|
|
277
|
+
blocked by safe evaluation (opt-in)
|
|
278
|
+
|
|
279
|
+
## Development
|
|
280
|
+
|
|
281
|
+
```bash
|
|
282
|
+
cargo test --all-targets --all-features
|
|
283
|
+
cargo clippy --all-targets --all-features -- -D warnings
|
|
284
|
+
cargo fmt --all -- --check
|
|
285
|
+
cargo build --release
|
|
286
|
+
make check-gnu-fixtures
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
The product-level compatibility contract is documented in
|
|
290
|
+
[`docs/rumdl-compatibility.md`](docs/rumdl-compatibility.md).
|
|
291
|
+
|
|
292
|
+
## Contributing
|
|
293
|
+
|
|
294
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
295
|
+
|
|
296
|
+
## License
|
|
297
|
+
|
|
298
|
+
MIT. See [LICENSE](LICENSE).
|
|
299
|
+
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
rumk-0.0.5.data/scripts/rumk.exe,sha256=iIP5r90i7fPiCtQqKENLuCApWfsCijnSiK6u09Kg948,3506688
|
|
2
|
+
rumk-0.0.5.dist-info/METADATA,sha256=p_S69XhTbqbVZoFWeJirSD4S9O-6KREDISQ9Q7iwB14,10413
|
|
3
|
+
rumk-0.0.5.dist-info/WHEEL,sha256=8Aej0W0a6Cz6apA3IzJrTnxLRVLAt-w0Oh8SA3Con_c,94
|
|
4
|
+
rumk-0.0.5.dist-info/licenses/LICENSE,sha256=NTJ5LF0SegnhXXgkiSAZT4YaGhgWpXsBzNzSBWPZ-3g,1100
|
|
5
|
+
rumk-0.0.5.dist-info/sboms/rumk.cyclonedx.json,sha256=xCra2-2wmq5divLcr9Q1LQgY1XP4he9HGbYvUPsJskc,70440
|
|
6
|
+
rumk-0.0.5.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025-2026 rumk contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|