Skip to content

support running custom_lint CLI within indivisual workspaces #363

@mj-hd

Description

@mj-hd

Describe the bug

When running custom_lint CLI inside a workspace directory, it implicitly fails to resolve the context root, resulting in a misleading message: No issues found!

Currently, custom_lint CLI appears to only work when executed at the project root directory.
Supporting execution within individual workspaces would be very helpful for large monorepos.

To Reproduce

here's a minimal repro:
https://github.com/mj-hd/workspace-custom-lint

when executing at the project root:

$ dart run custom_lint
Analyzing...                           0.0s

  packages/should_be_warning/lib/src/main.dart:2:9 • This is the description of our custom lint • custom_lint_plugin • WARNING
  packages/should_be_info/lib/src/main.dart:2:9 • This is the description of our custom lint • custom_lint_plugin • INFO

when executing at packages/should_be_warning/:

Analyzing...                           0.0s

No issues found!

Expected behavior
when executing at packages/should_be_warning/:

$ dart run custom_lint
Analyzing...                           0.0s

  packages/should_be_warning/lib/src/main.dart:2:9 • This is the description of our custom lint • custom_lint_plugin • WARNING

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