Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/src/content/docs/setup/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -523,11 +523,11 @@ gh aw lint --rules secret-leak --json # Emit structured diagnostic
gh aw lint --rules secret-leak --debug --json # Include incomplete-analysis warnings
```

**Options:** `--dir/-d`, `--shellcheck`, `--pyflakes`, `--rules`, `--list-rules`, `--json`, `--debug`, `--javascript-module`, `--javascript-mode`, `--javascript-root`, `--javascript-runtime-path`
**Options:** `--dir/-d`, `--shellcheck`, `--pyflakes`, `--rules`, `--list-rules`, `--json/-j`, `--debug`, `--javascript-module`, `--javascript-mode`, `--javascript-root`, `--javascript-runtime-path`

By default, shellcheck and pyflakes integrations are disabled to reduce noise for generated `run:` scripts. Built-in actionlint ignore patterns cover gh-aw-specific extensions such as `job.workflow_*` context properties and the `copilot-requests` permission scope.

`--rules` accepts comma-separated rule IDs; `--rules=` selects all registered rules without actionlint. Unknown IDs fail explicitly. `--json` requires `--rules` and has no `-j` shorthand; `--shellcheck` and `--pyflakes` apply only to actionlint. In the default mode, both linters run even if one reports errors, and either linter's failure produces a nonzero exit status.
`--rules` accepts comma-separated rule IDs; `--rules=` selects all registered rules without actionlint. Unknown IDs fail explicitly. `--json` requires `--rules` and supports the `-j` shorthand; `--shellcheck` and `--pyflakes` apply only to actionlint. In the default mode, both linters run even if one reports errors, and either linter's failure produces a nonzero exit status.

Secret-leak coverage warnings are hidden by default in text and JSON output, unless JavaScript analysis is explicitly enabled. Use `--debug` to include them otherwise. Error findings, analysis failures, and other linters' warnings remain visible. This is a presentation setting: the AST runner retains all coverage diagnostics, and an empty CLI result is not proof of complete analysis.

Expand Down Expand Up @@ -751,7 +751,7 @@ cat run-ids.txt | gh aw logs --stdin --repo owner/repo # required for bare num
gh aw logs --runtime cloud-hypervisor # Filter to runs using a specific sandbox agent runtime
```

**Options:** `--additional-grader`, `--after-run-id`, `--artifacts`, `--audit`, `--before-run-id`, `--cache-before`, `--cached-jsonl`, `--count/-c`, `--drain3-weights`, `--dry-run`, `--end-date`, `--engine/-e`, `--evals`, `--exclude-staged`, `--filtered-integrity`, `--firewall`, `--format`, `--graders`, `--harbor`, `--ignore-workflow-runs`, `--json/-j`, `--last`, `--max-github-api-rate-limit`, `--max-storage`, `--no-dry-run`, `--no-firewall`, `--output/-o`, `--parse`, `--prune-older-runs`, `--ref`, `--report-file`, `--repo/-r`, `--runtime`, `--safe-output`, `--start-date`, `--stdin`, `--summary-file`, `--timeout`, `--tool-graph`, `--train`
**Options:** `--additional-grader`, `--after-run-id`, `--artifacts`, `--audit`, `--before-run-id`, `--cache-before`, `--cached-jsonl`, `--count/-c`, `--drain3-weights`, `--dry-run`, `--end-date`, `--engine/-e`, `--episodes`, `--evals`, `--exclude-staged`, `--filtered-integrity`, `--firewall`, `--format`, `--graders`, `--harbor`, `--ignore-workflow-runs`, `--json/-j`, `--last`, `--max-github-api-rate-limit`, `--max-storage`, `--no-dry-run`, `--no-firewall`, `--outcomes`, `--outcomes-dir`, `--output/-o`, `--parse`, `--prune-older-runs`, `--ref`, `--report-file`, `--repo/-r`, `--runtime`, `--safe-output`, `--start-date`, `--stdin`, `--summary-file`, `--timeout`, `--tool-graph`, `--train`

`logs` defaults `--artifacts` to `usage` for faster, compact downloads. When usage lacks `aw_info.json`, metadata is fetched from the compact `info` artifact before falling back to legacy activation artifacts. The `--last` flag is an alias for `--count/-c`.
`--dry-run` selects only dry-run runs; `--no-dry-run` excludes them. These flags are mutually exclusive and work with workflow targets or `--stdin`. Older valid metadata without `dry_run` counts as a normal run; missing or malformed `aw_info.json` is excluded when either filter is active. Unified sessions preserve the flag as `workflow.info.data.dryRun`, and audit engine configuration exposes `dry_run`.
Expand Down Expand Up @@ -1044,7 +1044,7 @@ gh aw logs episode 1234567890 --repo owner/repo --outcomes
gh aw logs --outcomes --outcomes-dir ./otlp
```

**Options:** `--json/-j`, `--repo/-r`, `--output/-o`, `--episodes`, `--outcomes-dir`
**Options:** `--json/-j`, `--repo/-r`, `--output/-o`, `--episodes`, `--outcomes`, `--outcomes-dir`

The flag applies to selected runs in discovery, multi-workflow, stdin, and
episode collection. JSON includes `.outcomes[]` with per-run observations and
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/lint_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ All registered AST rules run by default. Use --rules to select AST rules and ski
cmd.Flags().Bool("pyflakes", false, "Enable pyflakes integration in actionlint")
cmd.Flags().StringSlice("rules", nil, "Select built-in AST rules and skip actionlint (default: all AST rules plus actionlint; empty selects all)")
cmd.Flags().Bool("list-rules", false, "List available built-in AST lint rules")
cmd.Flags().Bool("json", false, "Emit structured diagnostics (requires --rules)")
cmd.Flags().BoolP("json", "j", false, "Emit structured diagnostics (requires --rules)")
cmd.Flags().Bool("debug", false, "Include secret-leak analysis coverage warnings for investigation")
registerJavaScriptLintFlags(cmd)
// The root routes help to stderr. Structured lint reports belong on stdout.
Expand Down
1 change: 1 addition & 0 deletions pkg/cli/lint_command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ func TestNewLintCommand(t *testing.T) {
assert.Equal(t, "lint", cmd.Name(), "Command name should be 'lint'")
require.NotNil(t, cmd.Flags().Lookup("dir"), "lint command should have a --dir flag")
assert.Equal(t, "d", cmd.Flags().Lookup("dir").Shorthand, "--dir should have -d shorthand")
assert.Equal(t, "j", cmd.Flags().Lookup("json").Shorthand, "--json should have -j shorthand")
assert.Equal(t,
"Workflow directory (default: $GH_AW_WORKFLOWS_DIR or .github/workflows)",
cmd.Flags().Lookup("dir").Usage,
Expand Down
Loading