@wharflab/tally-windows-x64 0.23.2 → 0.26.2
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.
- package/README.md +6 -410
- package/bin/tally.exe +0 -0
- package/package.json +7 -3
package/README.md
CHANGED
|
@@ -1,424 +1,20 @@
|
|
|
1
|
-
# tally
|
|
1
|
+
# tally-cli
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
tally is a production-grade **Dockerfile/Containerfile linter + formatter** that keeps build files clean, modern, and consistent.
|
|
6
|
-
|
|
7
|
-
It uses **BuildKit's official parser and checks** (the same foundation behind `docker buildx`) plus a **safe auto-fix** engine. It runs fast,
|
|
8
|
-
doesn't require Docker Desktop or a daemon, and fits neatly into CI.
|
|
9
|
-
|
|
10
|
-
```bash
|
|
11
|
-
# Lint everything in the repo (recursive)
|
|
12
|
-
tally lint .
|
|
13
|
-
|
|
14
|
-
# Apply all safe fixes automatically
|
|
15
|
-
tally lint --fix Dockerfile
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## Why tally
|
|
19
|
-
|
|
20
|
-
Modern Dockerfiles deserve modern tooling. tally is opinionated in the right places:
|
|
21
|
-
|
|
22
|
-
- **BuildKit-native**: understands modern syntax like heredocs, `RUN --mount=...`, `COPY --link`, and `ADD --checksum=...`.
|
|
23
|
-
- **Fixes, not just findings**: `--fix` applies safe, mechanical rewrites; `--fix-unsafe` unlocks opt-in risky fixes (including AI).
|
|
24
|
-
- **Modernizes on purpose**: converts eligible `RUN`/`COPY` instructions to heredocs, prefers `ADD --extract`, and more.
|
|
25
|
-
- **Broad rule coverage**: combines Docker's official BuildKit checks, embedded ShellCheck for shell snippets, Hadolint-compatible rules, and
|
|
26
|
-
tally-specific rules.
|
|
27
|
-
- **Registry-aware without Docker**: uses a Podman-compatible registry client for image metadata checks (no daemon required).
|
|
28
|
-
- **Editor + CI friendly**: VS Code extension (`wharflab.tally`, powered by `tally lsp`) and outputs for JSON, SARIF, and GitHub Actions annotations.
|
|
29
|
-
- **Easy to install anywhere**: Homebrew, Go, npm, pip, and RubyGems.
|
|
30
|
-
- **Written in Go**: single fast binary, built on production-grade libraries.
|
|
31
|
-
|
|
32
|
-
Quality bar: **92% code coverage on Codecov** and **2,900+ Go tests executed in CI**.
|
|
33
|
-
|
|
34
|
-
Dockerfile linting usually means picking a compromise:
|
|
35
|
-
|
|
36
|
-
- **Hadolint** is popular and battle-tested, but it uses its own Dockerfile parser, so support for newer BuildKit features can lag behind. It also
|
|
37
|
-
is commonly consumed as a prebuilt binary, and it focuses on reporting — not fixing.
|
|
38
|
-
- **`docker buildx --check`** runs Docker's official BuildKit checks, but it requires the Docker/buildx toolchain and can be heavier than a pure
|
|
39
|
-
static linter (and not always available if you're using Podman/Finch/other runtimes).
|
|
40
|
-
|
|
41
|
-
Roadmap: more auto-fixes, more Hadolint parity, richer registry-aware checks, and higher-level rules (cache & tmpfs mount recommendations,
|
|
42
|
-
tooling-aware checks for uv/bun, line-length and layer optimizations).
|
|
43
|
-
|
|
44
|
-
## Optional: AI AutoFix via ACP
|
|
45
|
-
|
|
46
|
-
tally supports **opt-in AI AutoFix** for the kinds of improvements that are hard to express as a deterministic rewrite.
|
|
47
|
-
|
|
48
|
-
Instead of asking you for an API key, tally integrates with **ACP (Agent Client Protocol)** so you can use the agent you already trust (Gemini CLI,
|
|
49
|
-
OpenCode, GitHub Copilot CLI, and more), while tally keeps linting fast and validates proposed changes before applying them.
|
|
50
|
-
|
|
51
|
-
AI fixes are **rule-driven** (one narrow transformation at a time) and **verified** (re-parse + re-lint) before anything is applied.
|
|
52
|
-
|
|
53
|
-
- Guide: [`docs/guide/ai-autofix-acp.md`](docs/guide/ai-autofix-acp.md)
|
|
54
|
-
|
|
55
|
-
## Supported Rules
|
|
56
|
-
|
|
57
|
-
tally integrates rules from multiple sources:
|
|
58
|
-
|
|
59
|
-
<!-- BEGIN RULES_TABLE -->
|
|
60
|
-
| Source | Rules | Description |
|
|
61
|
-
|--------|-------|-------------|
|
|
62
|
-
| **[BuildKit](https://docs.docker.com/reference/build-checks/)** | 22/22 rules | Docker's official Dockerfile checks (captured + reimplemented) |
|
|
63
|
-
| **tally** | 28 rules | Custom rules including secret detection with [gitleaks](https://github.com/gitleaks/gitleaks) |
|
|
64
|
-
| **[Hadolint](https://github.com/hadolint/hadolint)** | 37 rules | Hadolint-compatible Dockerfile rules (expanding) |
|
|
65
|
-
<!-- END RULES_TABLE -->
|
|
66
|
-
|
|
67
|
-
Shell linting is provided via embedded ShellCheck (rules under the `shellcheck/` namespace).
|
|
68
|
-
|
|
69
|
-
**See [RULES.md](RULES.md) for the complete rules reference.**
|
|
3
|
+
A fast, configurable linter for Dockerfiles and Containerfiles.
|
|
70
4
|
|
|
71
5
|
## Installation
|
|
72
6
|
|
|
73
|
-
### Homebrew (macOS/Linux)
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
brew install wharflab/tap/tally
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
### NPM
|
|
80
|
-
|
|
81
7
|
```bash
|
|
82
8
|
npm install -g tally-cli
|
|
83
9
|
```
|
|
84
10
|
|
|
85
|
-
### PyPI
|
|
86
|
-
|
|
87
|
-
```bash
|
|
88
|
-
pip install tally-cli
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
### RubyGems
|
|
92
|
-
|
|
93
|
-
```bash
|
|
94
|
-
gem install tally-cli
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
### Go
|
|
98
|
-
|
|
99
|
-
```bash
|
|
100
|
-
go install github.com/wharflab/tally@latest
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
### From Source
|
|
104
|
-
|
|
105
|
-
```bash
|
|
106
|
-
git clone https://github.com/wharflab/tally.git
|
|
107
|
-
cd tally
|
|
108
|
-
go build .
|
|
109
|
-
```
|
|
110
|
-
|
|
111
11
|
## Usage
|
|
112
12
|
|
|
113
13
|
```bash
|
|
114
|
-
|
|
115
|
-
tally lint
|
|
116
|
-
|
|
117
|
-
# Check all Dockerfiles in current directory (recursive)
|
|
118
|
-
tally lint .
|
|
119
|
-
|
|
120
|
-
# Check with glob patterns
|
|
121
|
-
tally lint "**/*.Dockerfile"
|
|
122
|
-
|
|
123
|
-
# Exclude patterns
|
|
124
|
-
tally lint --exclude "vendor/*" --exclude "test/*" .
|
|
125
|
-
|
|
126
|
-
# Check with max lines limit
|
|
127
|
-
tally lint --max-lines 100 Dockerfile
|
|
128
|
-
|
|
129
|
-
# Output as JSON
|
|
130
|
-
tally lint --format json Dockerfile
|
|
131
|
-
|
|
132
|
-
# Check multiple files
|
|
133
|
-
tally lint Dockerfile.dev Dockerfile.prod
|
|
134
|
-
|
|
135
|
-
# Enable context-aware rules (e.g., copy-ignored-file)
|
|
136
|
-
tally lint --context . Dockerfile
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
### File Discovery
|
|
140
|
-
|
|
141
|
-
When given a directory, tally recursively searches for Dockerfiles using these default patterns:
|
|
142
|
-
|
|
143
|
-
- `Dockerfile`
|
|
144
|
-
- `Dockerfile.*` (e.g., `Dockerfile.dev`, `Dockerfile.prod`)
|
|
145
|
-
- `*.Dockerfile` (e.g., `api.Dockerfile`, `frontend.Dockerfile`)
|
|
146
|
-
- `Containerfile` (Podman convention)
|
|
147
|
-
- `Containerfile.*`
|
|
148
|
-
- `*.Containerfile`
|
|
149
|
-
|
|
150
|
-
Use `--exclude` to filter out unwanted files:
|
|
151
|
-
|
|
152
|
-
```bash
|
|
153
|
-
# Exclude vendor and test directories
|
|
154
|
-
tally lint --exclude "vendor/*" --exclude "test/*" .
|
|
155
|
-
|
|
156
|
-
# Exclude all .bak files
|
|
157
|
-
tally lint --exclude "*.bak" .
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
## Rules Overview
|
|
161
|
-
|
|
162
|
-
For the complete list of all supported rules, see **[RULES.md](RULES.md)**.
|
|
163
|
-
|
|
164
|
-
### Context-Aware Rules
|
|
165
|
-
|
|
166
|
-
Some rules require build context awareness. Enable them with the `--context` flag:
|
|
167
|
-
|
|
168
|
-
```bash
|
|
169
|
-
# Enable context-aware rules
|
|
170
|
-
tally lint --context . Dockerfile
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
**copy-ignored-file**: Detects when `COPY` or `ADD` commands reference files that would be excluded by `.dockerignore`. This helps catch mistakes
|
|
174
|
-
where files are copied but won't actually be included in the build.
|
|
175
|
-
|
|
176
|
-
```dockerfile
|
|
177
|
-
# .dockerignore contains: *.log
|
|
178
|
-
|
|
179
|
-
# This will trigger a warning:
|
|
180
|
-
COPY app.log /app/ # File matches .dockerignore pattern
|
|
181
|
-
|
|
182
|
-
# Heredoc sources are exempt (they're inline, not from context):
|
|
183
|
-
COPY <<EOF /app/config.txt
|
|
184
|
-
inline content
|
|
185
|
-
EOF
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
## Ignoring Violations
|
|
189
|
-
|
|
190
|
-
Suppress specific violations using inline comment directives:
|
|
191
|
-
|
|
192
|
-
```dockerfile
|
|
193
|
-
# tally ignore=StageNameCasing
|
|
194
|
-
FROM alpine AS Build
|
|
195
|
-
|
|
196
|
-
# tally global ignore=max-lines;reason=Generated file
|
|
197
|
-
FROM alpine
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
tally also supports `hadolint` and `check=skip` directive formats for easy migration.
|
|
201
|
-
|
|
202
|
-
**See [Configuration Guide](docs/guide/configuration.md#inline-directives) for full directive syntax.**
|
|
203
|
-
|
|
204
|
-
## Configuration
|
|
205
|
-
|
|
206
|
-
Create a `.tally.toml` in your project:
|
|
207
|
-
|
|
208
|
-
```toml
|
|
209
|
-
[output]
|
|
210
|
-
format = "text"
|
|
211
|
-
fail-level = "warning"
|
|
212
|
-
|
|
213
|
-
[rules]
|
|
214
|
-
include = ["buildkit/*", "tally/*"]
|
|
215
|
-
exclude = ["buildkit/MaintainerDeprecated"]
|
|
216
|
-
|
|
217
|
-
[rules.tally.max-lines]
|
|
218
|
-
max = 100
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
Configuration priority: CLI flags > environment variables > config file > defaults.
|
|
222
|
-
|
|
223
|
-
**See [Configuration Guide](docs/guide/configuration.md) for full reference.**
|
|
224
|
-
|
|
225
|
-
## Output Formats
|
|
226
|
-
|
|
227
|
-
tally supports multiple output formats for different use cases.
|
|
228
|
-
|
|
229
|
-
### Text (default)
|
|
230
|
-
|
|
231
|
-
Human-readable output with colors and source code snippets:
|
|
232
|
-
|
|
233
|
-
```bash
|
|
234
|
-
tally lint Dockerfile
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
```text
|
|
238
|
-
WARNING: StageNameCasing - https://docs.docker.com/go/dockerfile/rule/stage-name-casing/
|
|
239
|
-
Stage name 'Builder' should be lowercase
|
|
240
|
-
|
|
241
|
-
Dockerfile:2
|
|
242
|
-
────────────────────
|
|
243
|
-
1 │ FROM alpine
|
|
244
|
-
>>>2 │ FROM ubuntu AS Builder
|
|
245
|
-
3 │ RUN echo "hello"
|
|
246
|
-
────────────────────
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
### JSON
|
|
250
|
-
|
|
251
|
-
Machine-readable format with summary statistics and scan metadata:
|
|
252
|
-
|
|
253
|
-
```bash
|
|
254
|
-
tally lint --format json Dockerfile
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
The JSON output includes:
|
|
258
|
-
|
|
259
|
-
- `files`: Array of files with their violations
|
|
260
|
-
- `summary`: Aggregate statistics (total, errors, warnings, etc.)
|
|
261
|
-
- `files_scanned`: Total number of files scanned
|
|
262
|
-
- `rules_enabled`: Number of active rules (with `DefaultSeverity != "off"`)
|
|
263
|
-
|
|
264
|
-
```json
|
|
265
|
-
{
|
|
266
|
-
"files": [
|
|
267
|
-
{
|
|
268
|
-
"file": "Dockerfile",
|
|
269
|
-
"violations": [
|
|
270
|
-
{
|
|
271
|
-
"location": {
|
|
272
|
-
"file": "Dockerfile",
|
|
273
|
-
"start": { "line": 2, "column": 0 }
|
|
274
|
-
},
|
|
275
|
-
"rule": "buildkit/StageNameCasing",
|
|
276
|
-
"message": "Stage name 'Builder' should be lowercase",
|
|
277
|
-
"severity": "warning",
|
|
278
|
-
"docUrl": "https://docs.docker.com/go/dockerfile/rule/stage-name-casing/"
|
|
279
|
-
}
|
|
280
|
-
]
|
|
281
|
-
}
|
|
282
|
-
],
|
|
283
|
-
"summary": {
|
|
284
|
-
"total": 1,
|
|
285
|
-
"errors": 0,
|
|
286
|
-
"warnings": 1,
|
|
287
|
-
"info": 0,
|
|
288
|
-
"style": 0,
|
|
289
|
-
"files": 1
|
|
290
|
-
},
|
|
291
|
-
"files_scanned": 1,
|
|
292
|
-
"rules_enabled": 41
|
|
293
|
-
}
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
### SARIF
|
|
297
|
-
|
|
298
|
-
[Static Analysis Results Interchange Format](https://docs.oasis-open.org/sarif/sarif/v2.1.0/) for CI/CD integration with GitHub Code Scanning, Azure
|
|
299
|
-
DevOps, and other tools:
|
|
300
|
-
|
|
301
|
-
```bash
|
|
302
|
-
tally lint --format sarif Dockerfile > results.sarif
|
|
303
|
-
```
|
|
304
|
-
|
|
305
|
-
### GitHub Actions
|
|
306
|
-
|
|
307
|
-
Native GitHub Actions workflow command format for inline annotations:
|
|
308
|
-
|
|
309
|
-
```bash
|
|
310
|
-
tally lint --format github-actions Dockerfile
|
|
311
|
-
```
|
|
312
|
-
|
|
313
|
-
```text
|
|
314
|
-
::warning file=Dockerfile,line=2,title=StageNameCasing::Stage name 'Builder' should be lowercase
|
|
315
|
-
```
|
|
316
|
-
|
|
317
|
-
### Markdown
|
|
318
|
-
|
|
319
|
-
Concise Markdown tables optimized for AI agents and token efficiency:
|
|
320
|
-
|
|
321
|
-
```bash
|
|
322
|
-
tally lint --format markdown Dockerfile
|
|
14
|
+
npx tally-cli lint .
|
|
15
|
+
bunx tally-cli lint .
|
|
323
16
|
```
|
|
324
17
|
|
|
325
|
-
|
|
326
|
-
**2 issues** in `Dockerfile`
|
|
327
|
-
|
|
328
|
-
| Line | Issue |
|
|
329
|
-
| ---- | ------------------------------------------- |
|
|
330
|
-
| 10 | ❌ Use absolute WORKDIR |
|
|
331
|
-
| 2 | ⚠️ Stage name 'Builder' should be lowercase |
|
|
332
|
-
```
|
|
333
|
-
|
|
334
|
-
Features:
|
|
335
|
-
|
|
336
|
-
- Summary upfront with issue counts
|
|
337
|
-
- Sorted by severity (errors first)
|
|
338
|
-
- Emoji indicators: ❌ error, ⚠️ warning, ℹ️ info, 💅 style
|
|
339
|
-
- No rule codes or doc URLs (token-efficient)
|
|
340
|
-
- Multi-file support with File column when needed
|
|
341
|
-
|
|
342
|
-
### Output Options
|
|
343
|
-
|
|
344
|
-
| Flag | Description |
|
|
345
|
-
| --------------- | -------------------------------------------------------------------- |
|
|
346
|
-
| `--format, -f` | Output format: `text`, `json`, `sarif`, `github-actions`, `markdown` |
|
|
347
|
-
| `--output, -o` | Output destination: `stdout`, `stderr`, or file path |
|
|
348
|
-
| `--no-color` | Disable colored output (also respects `NO_COLOR` env var) |
|
|
349
|
-
| `--show-source` | Show source code snippets (default: true) |
|
|
350
|
-
| `--hide-source` | Hide source code snippets |
|
|
351
|
-
|
|
352
|
-
### Exit Codes
|
|
353
|
-
|
|
354
|
-
See [Exit Codes](docs/guide/exit-codes.md) for the full reference.
|
|
355
|
-
|
|
356
|
-
### Fail Level
|
|
357
|
-
|
|
358
|
-
Control which severity levels cause a non-zero exit code:
|
|
359
|
-
|
|
360
|
-
```bash
|
|
361
|
-
# Fail only on errors (ignore warnings)
|
|
362
|
-
tally lint --fail-level error Dockerfile
|
|
363
|
-
|
|
364
|
-
# Never fail (useful for CI reporting without blocking)
|
|
365
|
-
tally lint --fail-level none --format sarif Dockerfile > results.sarif
|
|
366
|
-
|
|
367
|
-
# Fail on any violation including style issues (default behavior)
|
|
368
|
-
tally lint --fail-level style Dockerfile
|
|
369
|
-
```
|
|
370
|
-
|
|
371
|
-
Available levels (from most to least severe): `error`, `warning`, `info`, `style` (default), `none`
|
|
372
|
-
|
|
373
|
-
## IDE Integration
|
|
374
|
-
|
|
375
|
-
### VS Code
|
|
376
|
-
|
|
377
|
-
Install the official **[tally extension](https://marketplace.visualstudio.com/items?itemName=wharflab.tally)** from the Visual Studio Marketplace for
|
|
378
|
-
real-time linting and diagnostics.
|
|
379
|
-
|
|
380
|
-
### JetBrains IDEs
|
|
381
|
-
|
|
382
|
-
Install the official **[Tally plugin](https://plugins.jetbrains.com/plugin/30255-tally)** from JetBrains Marketplace for IDE integration in
|
|
383
|
-
IntelliJ-based editors.
|
|
384
|
-
|
|
385
|
-
### Other Editors
|
|
386
|
-
|
|
387
|
-
Any editor that supports the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/) can use tally's built-in LSP server
|
|
388
|
-
over stdio:
|
|
389
|
-
|
|
390
|
-
```bash
|
|
391
|
-
npx -y tally-cli lsp --stdio
|
|
392
|
-
```
|
|
393
|
-
|
|
394
|
-
## Development
|
|
395
|
-
|
|
396
|
-
### Running Tests
|
|
397
|
-
|
|
398
|
-
```bash
|
|
399
|
-
# Run all tests
|
|
400
|
-
make test
|
|
401
|
-
|
|
402
|
-
# Run linting
|
|
403
|
-
make lint
|
|
404
|
-
|
|
405
|
-
# Run copy/paste detection (CPD)
|
|
406
|
-
make cpd
|
|
407
|
-
```
|
|
408
|
-
|
|
409
|
-
### Code Quality
|
|
410
|
-
|
|
411
|
-
This project uses:
|
|
412
|
-
|
|
413
|
-
- **golangci-lint** for Go linting
|
|
414
|
-
- **PMD CPD** for copy/paste detection (minimum 100 tokens)
|
|
415
|
-
|
|
416
|
-
Copy/paste detection runs automatically in CI and helps identify duplicate code patterns.
|
|
417
|
-
|
|
418
|
-
## Contributing
|
|
419
|
-
|
|
420
|
-
See [CLAUDE.md](CLAUDE.md) for development guidelines.
|
|
421
|
-
|
|
422
|
-
## License
|
|
18
|
+
## Documentation
|
|
423
19
|
|
|
424
|
-
|
|
20
|
+
See the [GitHub repository](https://github.com/wharflab/tally) for full documentation.
|
package/bin/tally.exe
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wharflab/tally-windows-x64",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.2",
|
|
4
4
|
"description": "tally binary for windows-x64",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -11,8 +11,12 @@
|
|
|
11
11
|
"url": "https://github.com/wharflab/tally/issues"
|
|
12
12
|
},
|
|
13
13
|
"homepage": "https://github.com/wharflab/tally#readme",
|
|
14
|
-
"os": [
|
|
15
|
-
|
|
14
|
+
"os": [
|
|
15
|
+
"win32"
|
|
16
|
+
],
|
|
17
|
+
"cpu": [
|
|
18
|
+
"x64"
|
|
19
|
+
],
|
|
16
20
|
"files": [
|
|
17
21
|
"bin/",
|
|
18
22
|
"README.md"
|