FP805 · contract-invalid
A contract file cannot be read (invalid YAML or schema), usually because it was edited by hand or merged badly.
| Code | Name | Category | Default severity | Reported by |
|---|---|---|---|---|
FP805 | contract-invalid | Contracts | 🔴 error | check, the action's mode: check, the editor with contracts |
Why it matters
An unreadable contract cannot be compared, so drift and breaking changes go unnoticed.
How to fix
Contracts are generated: resolve the merge by running flowpact generate instead of editing the file.
Example
# .github/flowpact/contracts/workflows/deploy.contract.yaml after a merge
interface:
inputs:
<<<<<<< HEAD
environment:
=======
env:
>>>>>>> mainAccept one finding
When a finding is intended, accept it with a reason rather than turning the rule off. It is listed apart from the other findings, and comes back when the date passes (overrides):
overrides:
- rule: FP805
target: <the finding's symbol>
reason: Why it is acceptable here, at least 10 characters.
expires: YYYY-MM-DD # optionaltarget is the symbol the finding is about; to list them:
flowpact lint --format json | jq -r '.findings[] | select(.code == "FP805") | .symbol'* matches within a path segment and ** across segments, so one entry accepts every finding whose symbol matches:
target: '**#inputs.app-id' is that input in every workflow and action.
Change the severity
Change the severity (or turn the rule off) in .github/flowpact/flowpact.config.yml, by code or by name:
rules:
FP805: off
# or: contract-invalid: errorExplain it in the terminal:
flowpact explain FP805