# Lint rules

| Rule | Category | Severity | What it says |
|---|---|---|---|
| `negative-shift` | lookahead | ERROR | `.shift({n})` moves a later bar's value onto an earlier bar. Use a number of bars back, 0 or more. |
| `centred-window` | lookahead | ERROR | A centred window reads bars after the one it is placed on. |
| `unseeded-random` | determinism | ERROR | This random source is not seeded, so two runs differ. Use ctx.rng in hooks, or numpy.random.default_rng(seed) with a fixed seed. |
| `mode-branch` | determinism | WARNING | This code depends on the run mode. If it changes trading, a backtest and a live run trade differently. |
| `last-row-in-compute` | lookahead | WARNING | `{expr}` reads the last bar of the whole history, which is later than most bars it decides on. |
| `whole-series-aggregate` | lookahead | WARNING | `{expr}` uses every bar, including later ones. Use a trailing window such as forge.series.rolling. |
| `fit-full-history` | lookahead | WARNING | A model is fitted on the whole history inside compute(), so early bars learn from later ones. |
| `reversed-series` | lookahead | WARNING | Reversing a series before a running calculation lets early bars read later ones. |
| `module-state` | determinism | WARNING | A module-level `{name}` is changed by strategy code, so results depend on what ran before. |
