Skip to content

bug: rules configuration is ignored in nested directories (e.g., in test/) #309

Description

@solid-illiaaihistov

File Structure

my_project/
  ├── analysis_options.yaml
  ├── lib/
  └── test/
       ├── analysis_options.yaml
       └── my_test.dart

analysis_options.yaml (Root)

analyzer:
  plugins:
    - solid_lints
solid_lints:
  diagnostics:
    avoid_late_keyword: true

test/analysis_options.yaml (Nested)

solid_lints:
  diagnostics:
    avoid_late_keyword: false

test/my_test.dart

void main() {
  late String myMock;
}

Expected behavior

No lint is triggered for test/my_test.dart because avoid_late_keyword is disabled in the nested test/analysis_options.yaml.

Actual behavior

The avoid_late_keyword lint rule is triggered for test/my_test.dart because the nested analysis_options.yaml is completely ignored, and the rules are evaluated using the root configuration.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions