Skip to content
This repository was archived by the owner on Mar 24, 2026. It is now read-only.
This repository was archived by the owner on Mar 24, 2026. It is now read-only.

custom_lint does not apply lints from transitive packages #372

@ChaserVasya

Description

@ChaserVasya

Snippets

app_lint package

# packages/app_lint/lib/analysis_options.yaml
include: package:altive_lints/altive_lints.yaml

analyzer:
  plugins:
    - custom_lint
...
# packages/app_lint/pubspec.yaml
...
dependencies:
  altive_lints: ^1.22.0
  custom_lint: ^0.7.0
...

main package

# pubspec.yaml
dev_dependencies:
  app_lint:
    path: packages/app_lint
# analysis_option.yaml
include: package:app_lint/analysis_options.yaml
// lib/main.dart

void main(){
  DateTime.now();
}

Expected behavior

dart run custom_lint outputs

Analyzing...                           0.0s

  lib/main.dart:9:3 • Avoid using DateTime.now(). Use a testable alternative like clock.now() or similar instead. • prefer_clock_now • INFO

1 issue found.

Actual behavior

dart run custom_lint outputs No issues found!
BUT
If I write next:

# pubspec.yaml
dev_dependencies:
  app_lint:
    path: packages/app_lint
  altive_lints: ^1.22.0

it outputs the issue.

I did not want to add direct altive_lints dependency in all packages

Context

dart info

- Dart 3.8.1 (stable) (Wed May 28 00:47:25 2025 -0700) on "macos_arm64"
- on macos / Version 26.1 (Build 25B78)
- locale is ru-RU

custom lint: 0.7.6

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions