Configuration
On this page
This guide covers .flow/review.yml, the settings of a Flow code review. You will learn:
- What each setting does, and its default
- How to accept a finding
Overview
Section titled "Overview"npx @adonisplus/flow install writes .flow/review.yml with the built-in lenses. Commit it. Once it exists, the installer leaves it as it is, so your changes stay.
agent, env, emojis, triggers and workflow apply only to reviews on GitHub. Flow reads them from your default branch, so a pull request cannot change how it is reviewed. A local review uses the other settings, and reports every finding, with no maxFindings limit.
agent: claude
maxFindings: 10
ignore: ['database/seeders/**']
env: ['DATABASE_URL']
triggers:
drafts: false
lenses:
- ref: .flow/lenses/review-access-control.md
globs: ['app/**']
- ref: .flow/lenses/review-code-placement.md
globs: ['app/**']
severity: nitSettings
Section titled "Settings"lenseslistref, the path of its file, globs, the files it reads, and an optional severity that gives all its findings that severity: critical, major, minor or nit. Without globs, a lens reads every changed file. See Lenses.maxFindingsnumber10.maxParallelnumber4.batchSizenumber20.ignorelist of globsacceptedlistagentclaude | codexenvlist of namesDATABASE_URL for a test run. The model credential and GITHUB_TOKEN are never passed.emojismaptriggers.draftsbooleanfalse.triggers.forksmembers | allmembers reviews only those of people with write access to the repository. Defaults to members.workflowstringflow-review.yml.Accepting a finding
Section titled "Accepting a finding"When your team decides a finding is fine, accept it so the review stops reporting it.
For the whole repository, add it to accepted, with the lens, the finding in a few words, and the reason.
accepted:
- lens: review-query-cost
finding: Reports loads every order of the month
reason: The report runs once a night on a replicaFor one place in the code, add a flow-allow comment right above the line or block. Name the doc or skill whose rule the code breaks, and why it must. A reason that only says someone asked for it is not enough.
// flow-allow flow-cruddy-controllers: Stripe calls this exact path, so it cannot be a resource route
router.post('/stripe/webhook', [controllers.Webhooks, 'handle'])