---
title: "lint/complexity/prefer-absolute-include"
pagination: false
---

{/* Generated by scripts/gen-rule-docs.py. Edit mapping.toml, not this file. */}

<RuleId id="lint/complexity/prefer-absolute-include" />

In the [`code-quality`](/docs/rules/sets/code-quality) set. Safe fix.

## What it does

Migrate include/require to absolute path. This Rector might introduce backwards incompatible code, when the include/require being changed depends on the current working directory.

## Configuration

```toml title="pun.toml"
[lint.rules]
"complexity/prefer-absolute-include" = "error"
```

To skip it in some files or lines, add an [override](/docs/configuration/pun-toml#lint) or an [ignore comment](/docs/configuration/ignore-comments).

## Replaces

- [`AbsolutizeRequireAndIncludePath`](https://getrector.com/rule-detail/absolutize-require-and-include-path-rector) (rector)

[More lint/complexity rules](/docs/rules/lint/complexity) · [Edit this page](https://github.com/shipfastlabs/pun/edit/main/crates/pun-config/rules/mapping.toml)
