Clash rules

The ten clash rules: what each one catches, how severe it is, and an example.

Every clash comes from one of these rules. They compare two lanes at a time and are deterministic: the same changes always give the same clashes. R1–R9 can be turned off or given a different severity inthe config. Clashes found only by name, in Go, Rust, Java, Kotlin, Swift, Ruby, C# and PHP, are capped at warn: those languages are analyzed without imports and argument counts.

R2 SIGNATURE_BREAK

One lane changes a function's signature while another lane adds a call in the old form.

Severity
high or warn
Detected
On your machine and in the GitHub Action
Example
One lane login(user) becomes login(user, opts); the other adds login(user) in report.ts.

R3 REMOVED_DEPENDENCY

One lane removes or renames something another lane starts using.

Severity
high
Detected
On your machine and in the GitHub Action
Example
One lane deletes formatDate(); the other imports formatDate() in invoice.ts.

R1 SAME_SYMBOL

Both lanes change the same function, class or type in different ways.

Severity
high or warn
Detected
On your machine and in the GitHub Action
Example
One lane rewrites the body of charge(); the other adds a retry to charge().

R4 TEXT_OVERLAP

Both lanes edit the same lines of a file; confirmed with an in-memory git merge.

Severity
high or warn
Detected
On your machine and in the GitHub Action
Example
One lane edits lines 40–52 of config.ts; the other edits lines 48–60 of config.ts.

R5 CLAIM_CONFLICT

A lane edits code another lane has claimed for a refactor.

Severity
high or warn
Detected
On your machine (claims are local)
Example
One lane claims src/auth/** "moving to sessions"; the other edits src/auth/token.ts.

R6 TYPE_SHAPE_CHANGE

One lane changes the shape of a type or class another lane starts using.

Severity
warn
Detected
On your machine and in the GitHub Action
Example
One lane adds a required field to User; the other builds a User object in seed.ts.

R7 MIGRATION_COLLISION

Both lanes add database migrations with the same number, or interleaved on the same table.

Severity
high or warn
Detected
On your machine and in the GitHub Action
Example
One lane adds 0042_add_plan.sql; the other adds 0042_add_teams.sql.

R8 DEPENDENCY_DIVERGENCE

Both lanes change the same dependency to different versions, or both change a lockfile.

Severity
warn
Detected
On your machine and in the GitHub Action
Example
One lane react 18.3; the other react 19.0.

R9 ROUTE_OR_ENV_COLLISION

Both lanes add the same route, or the same environment variable with different values.

Severity
warn
Detected
On your machine and in the GitHub Action
Example
One lane adds GET /users/:id; the other adds GET /users/:id.

R10 COMBINED_FAILURE

Two pull requests build and test fine alone but fail together.

Severity
high
Detected
In the GitHub Action, when it builds pull requests together
Example
One lane lowers max to 5; the other raises min to 6.

Silencing a rule on one line

A comment with lanekeeper-ignore and rule ids on its own line covers the next line; after code on the same line it covers only that line; without rule ids it covers every rule it applies to. It works in any language's comment syntax and applies to clashes that come from a definition or a use on that line: R1, R2, R3, R6, and R5 for symbol claims. Line overlaps (R4) and migration, dependency, route and environment clashes (R7–R9) can be turned off in the config instead.

// Kept in the old form on purpose until v3.
// lanekeeper-ignore R2
legacyLogin(user);