Skip to main content

import-shadows-import

Summary: Import shadows import

Category: Imports

Avoid

package policy

import data.permissions
import data.users

# Already imported
import data.permissions

Prefer

package policy

import data.permissions
import data.users

Rationale

Duplicate imports are redundant, and while harmless, should just be removed.

Configuration Options

This linter rule provides the following configuration options:

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

Community

If you think you've found a problem with this rule or its documentation, would like to suggest improvements, new rules, or just talk about Regal in general, please join us in the #regal channel in the Styra Community Slack!