daco
0.5.2+1, released 11 days ago by gabriel.terwesten.net
A tool for maintaining Dart documentation comments and formatting embedded code examples.
What it does
Daco formats documentation comments as Markdown using prettier and formats/analyzes embedded Dart code examples. It provides both an analyzer plugin for syntax errors and a `daco analyze` command for full semantic analysis.
AI-written summary of version 0.5.2+1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want to automatically format and wrap documentation comments and markdown tables
- You want syntax and semantic checking for Dart code examples inside doc comments
- You use prettier for Markdown formatting in your Dart project workflow
Skip it when
- You do not use Markdown for documentation comments
- You cannot install NodeJS on your path (required for prettier)
Strengths
- Supports recursive formatting of doc comments and embedded Dart code
- Integrates with the Dart analyzer plugin to catch syntax errors in examples
- Performs full semantic analysis via `daco analyze`
Weaknesses
- Requires a recent version of NodeJS (>=14) installed on the path
- Potential changes to dartdoc tag locations when formatting preexisting codebases
Setup
- Kind
- Pure Dart
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 14
Requires NodeJS (>=14) installed on the path. Add daco as a dev dependency, enable the analyzer plugin in analysis_options.yaml, and optionally install globally via pub global activate.
/// Greets the user.
///
/// ```dart main
/// greet(name: 'Alice');
/// ```
void greet({required String name}) {}Works with
Packages commonly used together with daco: ones it builds on, ones built on it, and its own family.
- analyzerdaco depends on itPerforms static analysis of Dart code for tool integration and embedding.
- pub_semverdaco depends on itVersions and version constraints implementing pub's versioning policy.
- package_configdaco depends on itRead and write Dart package configuration files.
- dart_styledaco depends on itProvides an API and CLI to format Dart source code automatically.
- pubspec_parsedaco depends on itParse pubspec.yaml files with a type‑safe API and detailed error reporting.
- argsdaco depends on itLibrary for parsing raw command-line arguments into options and values using GNU and POSIX styles.
- cli_utildaco depends on itUtilities to help build Dart command-line apps, find the SDK, and display progress.
- analysis_server_plugindaco depends on itFramework and support code for building plugins for the Dart analysis server.