Pre-commit scans
When Lighthouse can't scan
Lighthouse never blocks a commit because of its own problems. Here's what you'll see instead.
If Lighthouse can't finish a scan, your commit goes through. A scan blocks only when it completed and found something that reaches your blocking policy. Lighthouse being down, slow, or out of credits never stops your work. This is called fail-open.
Messages
| Message | Meaning | Do this |
|---|---|---|
lighthouse: scan skipped and a reason | Lighthouse didn't scan, usually because your team or key is out of credits. | See When you run out of credits. |
lighthouse: scan request failed: … | The CLI couldn't reach Lighthouse, or the request timed out. | Check your network. If it keeps happening, run reware-lighthouse status. |
lighthouse: scan returned an invalid response. | Something went wrong on Lighthouse's side. | Keep working. If it persists, contact support. |
lighthouse: no staged files to scan. | You ran scan with nothing staged. | Stage changes with git add first. |
lighthouse: could not identify a project. | The CLI can't tell which repository this is. | Run reware-lighthouse init, or pass --repo owner/name. |
lighthouse: could not save the scan report: … | The scan finished, but the report file couldn't be written. | Check disk space and permissions on .git/. A blocking scan still blocks. |
Timeout
A scan waits up to 1,100 seconds (about 18 minutes) before giving up and letting the commit through. Most finish much sooner. To change the limit, set LIGHTHOUSE_SCAN_TIMEOUT in seconds:
export LIGHTHOUSE_SCAN_TIMEOUT=300Max depth without an ingestion
When a repository is set to Max depth but has no completed ingestion, the pre-commit scan runs at Normal depth, and the output says Used normal effort instead. Run an ingestion to fix it.
Still stuck after reading this page?