Skip to content

implementation_imports linting rule only works in lib directory #59384

@akasha19

Description

@akasha19

Describe the issue
The implementations_imports rule only checks files that are in the lib directory of a package. src imports in other directories like test or bin are not found so there is no warning.

To Reproduce

analysis_options.yaml

linter:
  rules:
    - implementation_imports

any file in directory other than lib

import 'package:foo/src/something.dart';

Expected behavior
As I don't understand why this rule would only be important in the lib directory and not other directories I'm assuming this is a bug.

Additional context
Came here from https://stackoverflow.com/questions/77909927/why-does-the-implementation-imports-linting-rule-only-work-in-lib-directory

Metadata

Metadata

Assignees

Labels

P2A bug or feature request we're likely to work onarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-linterIssues with the analyzer's support for the linter packagelinter-false-negativeIssues related to lint rules that fail to report a problem.linter-set-recommendedtype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions