richardwooding/file-search-on review gate

Diff-scoped code review gate (complexity, cognitive complexity, dead code) with SARIF output for Code Scanning.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit Jul 10, 2026
License
MIT

Pinned Snippet

workflow.ymlSHA-pinned
uses: richardwooding/file-search-on@f163b11e6aa561a3e52c1c48151098ca17c50358 # v0.119.1

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
directoryRepository directory to review (git working dir & walk root)..
baseGit 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.""
exprCEL pre-filter for which files enter the graph. Defaults to is_source when empty.""
max-complexityCyclomatic-complexity ceiling for a function in a changed file; above it is a fail-level finding.15
max-cognitiveCognitive-complexity ceiling (SonarSource, nesting-weighted) for a function in a changed file; above it is a fail-level finding.15
skip-dead-codeSkip the dead-code check (it adds a second graph pass).false
baselineOnly 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
strictTreat warn-level findings as failures for the verdict / exit code.false
excludeNewline-separated basename globs to prune from the walk.""
prune-build-artefactsPrune canonical build-artefact dirs (vendor / node_modules / target / …).false
respect-gitignoreParse a .gitignore at the walk root and skip matching paths.false
timeoutMaximum duration (Go duration, e.g. 5m). On expiry the partial verdict is reported and the gate fails.""
versionfile-search-on release to use. Empty = the action ref when it is a vX.Y.Z tag, else the latest release.""
upload-sarifUpload the SARIF report to GitHub Code Scanning.true
sarif-filePath to write the SARIF report.file-search-on-review.sarif
gateFail the action on a fail (or timeout) verdict. Set false to report-only — findings still upload as annotations.true
namedescription
verdictpass | warn | fail | timeout | interrupted.
fail-countNumber of fail-level findings.
warn-countNumber of warn-level findings.
sarif-filePath to the generated SARIF report.