richardwooding/file-search-on review gate
Diff-scoped code review gate (complexity, cognitive complexity, dead code) with SARIF output for Code Scanning.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit Jul 10, 2026
- License
- MIT
Pinned Snippet
uses: richardwooding/file-search-on@f163b11e6aa561a3e52c1c48151098ca17c50358 # v0.119.1tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| directory | Repository directory to review (git working dir & walk root). | — | . |
| base | Git ref to diff against. Empty reviews uncommitted changes vs HEAD; on pull_request events it defaults to the PR base (origin/<base_ref>). A ref like origin/main reviews <base>...HEAD. | — | "" |
| expr | CEL pre-filter for which files enter the graph. Defaults to is_source when empty. | — | "" |
| max-complexity | Cyclomatic-complexity ceiling for a function in a changed file; above it is a fail-level finding. | — | 15 |
| max-cognitive | Cognitive-complexity ceiling (SonarSource, nesting-weighted) for a function in a changed file; above it is a fail-level finding. | — | 15 |
| skip-dead-code | Skip the dead-code check (it adds a second graph pass). | — | false |
| baseline | Only fail on complexity/cognitive findings new or worsened vs the base ref — don't block a PR on pre-existing debt in files it merely touched. | — | false |
| strict | Treat warn-level findings as failures for the verdict / exit code. | — | false |
| exclude | Newline-separated basename globs to prune from the walk. | — | "" |
| prune-build-artefacts | Prune canonical build-artefact dirs (vendor / node_modules / target / …). | — | false |
| respect-gitignore | Parse a .gitignore at the walk root and skip matching paths. | — | false |
| timeout | Maximum duration (Go duration, e.g. 5m). On expiry the partial verdict is reported and the gate fails. | — | "" |
| version | file-search-on release to use. Empty = the action ref when it is a vX.Y.Z tag, else the latest release. | — | "" |
| upload-sarif | Upload the SARIF report to GitHub Code Scanning. | — | true |
| sarif-file | Path to write the SARIF report. | — | file-search-on-review.sarif |
| gate | Fail the action on a fail (or timeout) verdict. Set false to report-only — findings still upload as annotations. | — | true |
Outputs
| name | description |
|---|---|
| verdict | pass | warn | fail | timeout | interrupted. |
| fail-count | Number of fail-level findings. |
| warn-count | Number of warn-level findings. |
| sarif-file | Path to the generated SARIF report. |