---
title: "DrcResult"
description: "Result of running design rule checks."
canonical_url: "https://www.rosette.dev/docs/api-reference/DrcResult"
markdown_url: "https://www.rosette.dev/docs/api-reference/DrcResult.md"
source_url: "https://github.com/PreFab-Photonics/rosette/blob/f086d7670645fd36c05362d696d442a2b2e74850/www/content/docs/api-reference/DrcResult.mdx"
docs_channel: "main"
docs_revision: "f086d7670645fd36c05362d696d442a2b2e74850"
---

# DrcResult

Result of running DRC.

Import with `from rosette.drc import DrcResult`.

Returned by `run_drc()`. Contains a list of violations and summary statistics
about the check. Use the `passed` attribute for a quick pass/fail check.

```python
result = run_drc(cell, rules)
if result.passed:
    print(f"DRC passed ({result.polygons_checked} polygons, {result.rules_checked} rules)")
    if result.warning_count:
        print(f"  ({result.warning_count} warnings, review recommended)")
else:
    print(f"DRC failed with {result.error_count} errors, {result.warning_count} warnings")
    for v in result.violations:
        print(f"  [{v.severity}] {v.message}")
```

## Attributes



### `violations`

```python
violations: list[DrcViolation]
```

List of all DRC violations found, including both errors and warnings.





### `passed`

```python
passed: bool
```

`True` if no error-severity violations were found.

Warnings (see [`DrcRules.warning_margin`](/docs/api-reference/DrcRules#warning_margin)) do not cause this to
be `False`. A run with only warnings still passes. `rosette drc` and
`rosette check` use this attribute for their exit code.





### `error_count`

```python
error_count: int
```

Number of error-severity violations.





### `warning_count`

```python
warning_count: int
```

Number of warning-severity violations.





### `polygons_checked`

```python
polygons_checked: int
```

Number of polygons checked during the DRC run.





### `rules_checked`

```python
rules_checked: int
```

Number of rules evaluated.





### `elapsed_ms`

```python
elapsed_ms: float
```

Elapsed time in milliseconds.





### `suppressed_violations`

```python
suppressed_violations: int
```

Number of violations suppressed by explicit [`DrcPolicy`](/docs/api-reference/DrcPolicy) cell
skips.

A violation is suppressed when every cell it names is within the
skipped-cell closure (a cell passed to `DrcPolicy.skip_cell()` or any cell
reachable from it through child-cell references). Violations with unknown
cell-name provenance are kept as a safe default.

Per-polygon rules (`MinWidth`, `MinArea`, etc.), cross-layer pairwise rules (`Enclosure`,
`RequireOverlap`, cross-layer `MinSpacing`/`ForbidOverlap`) and
`NotInside` all carry cell-name provenance and therefore participate in
suppression. The only rule that does not is `Density`, whose window-level
check has no single source cell.





### `skipped_cells`

```python
skipped_cells: int
```

Number of unique cells in the skipped-cell closure for this run. That is,
cells explicitly skipped by the run's policy plus every cell reachable from
them via child-cell references.





### `waived_violations`

```python
waived_violations: int
```

Number of violations suppressed by a
[`DrcPolicy.waive_region()`](/docs/api-reference/DrcPolicy#waive_region) waiver.

A violation is waived when it was not already suppressed by a policy cell
skip and its location is fully contained within at least one waiver region
(transformed into top-level global coordinates for the relevant placement of
its owning cell). A violation suppressible by both mechanisms is counted as a
cell-skip suppression, not a waiver.