---
title: "CheckViolation"
description: "A single design-check violation."
canonical_url: "https://www.rosette.dev/docs/api-reference/CheckViolation"
markdown_url: "https://www.rosette.dev/docs/api-reference/CheckViolation.md"
source_url: "https://github.com/PreFab-Photonics/rosette/blob/f086d7670645fd36c05362d696d442a2b2e74850/www/content/docs/api-reference/CheckViolation.mdx"
docs_channel: "main"
docs_revision: "f086d7670645fd36c05362d696d442a2b2e74850"
---

# CheckViolation

A single check violation.

Import with `from rosette.checks import CheckViolation`.

Returned as part of a `ChecksResult` after running `run_checks()`. Each
violation describes a connectivity or bend radius issue found in the design,
including the hierarchy path to the affected port or component.

```python
result = run_checks(cell, config=config)
for v in result.violations:
    print(f"[{v.severity}] {v.rule_id}: {v.message}")
    print(f"  at {v.cell_path}/{v.name}")
```

## Attributes



### `violation_type`

```python
violation_type: Literal['unconnected_port', 'width_mismatch', 'angle_mismatch', 'shorted_net', 'port_uncheckable', 'port_width_uncheckable', 'missing_reference', 'hierarchy_cycle', 'bend_radius_too_small', 'bend_radius_auto_reduced', 'bend_radius_uncheckable', 'route_warning', 'route_annotations_missing']
```

Type of violation. One of:

* `"unconnected_port"`: a port has no matching partner
* `"width_mismatch"`: connected ports have different widths
* `"angle_mismatch"`: connected ports are not anti-parallel within tolerance
* `"shorted_net"`: more than two logical terminals share a connectivity node
* `"port_uncheckable"`: a port transform could not be represented safely
* `"port_width_uncheckable"`: a port width has an unsupported transform
* `"missing_reference"`: a referenced cell is absent from the library
* `"hierarchy_cycle"`: a cycle prevented complete hierarchy traversal
* `"bend_radius_too_small"`: a bend is below the minimum radius
* `"bend_radius_auto_reduced"`: a bend radius was automatically reduced by the router
* `"bend_radius_uncheckable"`: a supplied bend could not be evaluated safely
* `"route_warning"`: the router emitted a warning while constructing the route
* `"route_annotations_missing"`: bend checking lacks required cell annotations





### `details`

```python
details: dict[str, float]
```

Structured numeric measurements and limits. For example, an angle mismatch
contains `deviation_deg` and `tolerance_deg`, while a bend-radius violation
contains `radius` and `min_radius`.





### `rule_id`

```python
rule_id: str
```

Stable machine-readable identifier such as `"connectivity.shorted_net"` or
`"routing.bend_radius_too_small"`.





### `name`

```python
name: str
```

Name of the relevant port or component.





### `cell_path`

```python
cell_path: str
```

Hierarchy path to the cell containing the violation (e.g., `"mmi_1/out_2"`).





### `partner_name`

```python
partner_name: str | None
```

Name of the partner port, for connectivity mismatch violations. `None` for
unconnected ports and bend radius violations.





### `partner_path`

```python
partner_path: str | None
```

Hierarchy path to the partner port. `None` when there is no partner.





### `message`

```python
message: str
```

Human-readable description of the violation.





### `severity`

```python
severity: str
```

Severity level: `"error"` or `"warning"`.





### `bbox`

```python
bbox: tuple[tuple[float, float], tuple[float, float]]
```

Bounding box around the violation as `((min_x, min_y), (max_x, max_y))`.