# pointless-import

**Summary**: Importing own package is pointless

**Category**: Imports

**Avoid**

```
package policy# pointless, as policy is the own packageimport data.policy# pointless, as rules in own package can be referenced without the importimport data.policy.rulerule if {    # ..conditions..}
```

**Prefer**

```
package policy
```

## Rationale

There's no point importing the own package, or rules from the same module, as both can be referenced just as well without the import.

## Configuration Options

This linter rule provides the following configuration options:

```
rules:  imports:    pointless-import:      # one of "error", "warning", "ignore"      level: error
```

## Related Resources

*   GitHub: [Source Code](https://github.com/open-policy-agent/regal/blob/main/bundle/regal/rules/imports/pointless-import/pointless_import.rego)