Skip to content

CV11 — Inconsistent cast style within a statement

Group: Convention · Auto-fixable: no

A statement that mixes the x::type shorthand with CAST(x AS type) is noisy. The first cast’s style is taken as canonical and the others are flagged; pick one and stick to it.

bad: SELECT a::int, CAST(b AS text) FROM t
good: SELECT a::int, b::text FROM t

Disable this rule in banshee.toml:

[lint]
exclude = ["CV11"]

Or silence one line with -- noqa: CV11. See Linting.