Points kept as parallel coordinate arrays
let xs: [D]Int = read() and let ys: [D]Int = read() indexed together: [D] i => Pt(xs[i], ys[i])
let n: 1..=1000 = read()
let xs: [0..n]Int = read()
let ys: [0..n]Int = read()
for i in 0..n:
print(xs[i] - xs[0], ys[i] - ys[0])let n: 1..=1000 = read()
let xs: [0..n]Int = read()
let ys: [0..n]Int = read()
let p = [0..n] i => Pt(xs[i], ys[i])
for i in 0..n:
let d = p[i] - p[0]
print(d.x, d.y)Why
Geometry input often gives all x coordinates and then all y coordinates, and the natural first program keeps them that way: xs[i] * ys[j] - xs[j] * ys[i] for a cross product, xs[i] - xs[j] and ys[i] - ys[j] for a vector. Every formula then repeats itself once per axis, and swapping an x for a y is a typo the checker cannot see. Building the points once, let p = [D] i => Pt(xs[i], ys[i]), gives p[i] - p[j], p[i].cross(p[j]), p[i].dot(p[j]) and the rest of std.geometry on whole points. When the input gives one point per line, let p: [D]Pt = read() reads them directly. The rule fires on two adjacent read()s of the same array type named xs/ys (or x/y, px/py) that are later combined across two points (xs[i] * ys[j], xs[i] - xs[j]); data columns combined at one index (x[i] * y[i]) are not reported; there is no automatic fix.
The practice it serves
A hand-written pattern the language or the standard library already says in one step. Family: S.geometry.
Not flagged
A near miss: close to the pattern, but not it.
let (n, m): (1..=1000, 1..=1000) = read()
let xs: [0..n]Int = read()
let ys: [0..m]Int = read()
print(xs[0] + ys[0])Turn it off
For one block, wrap it in with lint(tuple_points: allow):. For a project, add tuple_points = "allow" under [lints] in cp.toml.
Generated from spec/lints/tuple_points, the same record the linter is built from.