dcq_standalone
Standalone CLI for running DCQ lint rules against any Dart or Flutter project, regardless of the target project's analyzer version.
Installation
dart pub global activate dcq_standalone
This adds the dcq command to your PATH.
Usage
# Analyze current directory
dcq
# Analyze a specific project
dcq /path/to/project
# Only run specific rules
dcq --rules=avoid-dynamic,no-empty-block
# JSON output (for CI integration)
dcq --json
How it works
The tool creates its own AnalysisContextCollection using the analyzer
package bundled with DCQ — not the target project's. This means it works
on projects with any Dart SDK version, since it brings its own analyzer.
Because dcq_standalone manages its own dependencies, it does not need
to be added as a dependency in your project's pubspec.yaml. This is what
allows it to work on projects with outdated or conflicting analyzer versions.
Rules read configuration from the target project's analysis_options.yaml
(dart_code_quality: section), so per-project config is respected.
Library API
The analysis engine is also available as a library:
import 'package:dcq_standalone/dcq_standalone.dart';
final rules = collectAllRules(projectRoot: '/path/to/project');
final issues = await analyzePackage('/path/to/project', rules);