When your commit is blocked
Why Lighthouse stopped your commit, and what you can do.
Lighthouse blocks a commit when the scan finds something at or above your repository's blocking policy. With the default policy, a critical finding blocks.
$ git commit -m "add invoice export"
Running Lighthouse scan
✗ commit blocked · 1 finding(s)
critical 1 high 0 medium 0 low 0
report .git/lighthouse/findings/3f2a….md
view https://lighthouse.rewarelabs.com/scans/3f2a…
✗ commit blocked by the repository's scan policy.Your changes are still staged. Nothing is lost.
What to do
Read the finding
Open the report or the view link. The finding says what's wrong, where, and how to fix it.
Fix it and commit again
Change the code, git add it, and run git commit again. A new scan runs on the updated change.
If it isn't a real problem
Ask an admin or the repository's maintainer to mark it as a false positive. Lighthouse then re-decides the scan without it. Commit again after it's marked.
Commit anyway
--no-verify skips every pre-commit hook, including Lighthouse:
git commit --no-verify -m "..."Use it rarely, and tell your team. The pull request is still scanned on GitHub, and its check can block the merge.
Change what blocks
Admins and maintainers set the blocking policy per repository. See Blocking policy.