mirror of
https://github.com/flutter/flutter
synced 2024-11-05 18:37:51 +00:00
183bc15816
## Description This moves the snippets package back into the Flutter repo so that API documentation generation can happen without the use of `dart pub global run` because `pub run` doesn't handle concurrency well. The change modifies the dartdoc building process to include building an executable from the snippets tool and installing that in the cache directory for use during docs generation. The snippets tool will reside in dev/snippets, where it originally resided before being moved to https://github.com/flutter/assets-for-api-docs. The snippets code itself is unchanged from the code that is in https://github.com/flutter/assets-for-api-docs/packages/snippets. ## Related Issues - https://github.com/flutter/flutter/issues/144408 - https://github.com/flutter/flutter/issues/147609 - https://github.com/flutter/flutter/pull/147645 ## Tests - Added snippets tests to the overall testing build.
42 lines
1.8 KiB
YAML
42 lines
1.8 KiB
YAML
# This file is used by dartdoc when generating API documentation for Flutter.
|
|
dartdoc:
|
|
# Before you can run dartdoc, the snippets tool needs to be
|
|
# activated with "pub global activate snippets <version>"
|
|
# The dev/bots/docs.sh script does this automatically.
|
|
tools:
|
|
snippet:
|
|
command: ["bin/cache/artifacts/snippets/snippets", "--output-directory=doc/snippets", "--type=snippet"]
|
|
description: "Creates sample code documentation output from embedded documentation samples."
|
|
sample:
|
|
command: ["bin/cache/artifacts/snippets/snippets", "--output-directory=doc/snippets", "--type=sample"]
|
|
description: "Creates full application sample code documentation output from embedded documentation samples."
|
|
dartpad:
|
|
command: ["bin/cache/artifacts/snippets/snippets", "--output-directory=doc/snippets", "--type=dartpad"]
|
|
description: "Creates full application sample code documentation output from embedded documentation samples and displays it in an embedded DartPad."
|
|
errors:
|
|
## Default errors of dartdoc:
|
|
- duplicate-file
|
|
- invalid-parameter
|
|
- tool-error
|
|
- unresolved-export
|
|
## Warnings that are elevated to errors:
|
|
- ambiguous-doc-reference
|
|
- ambiguous-reexport
|
|
- broken-link
|
|
- category-order-gives-missing-package-name
|
|
- deprecated
|
|
- ignored-canonical-for
|
|
- missing-example-file
|
|
- missing-from-search-index
|
|
- no-canonical-found
|
|
- no-documentable-libraries
|
|
- no-library-level-docs
|
|
- orphaned-file
|
|
- reexported-private-api-across-packages
|
|
- unknown-file
|
|
- unknown-html-fragment
|
|
- unknown-macro
|
|
- unresolved-doc-reference
|
|
## Ignores that are elevated to errors:
|
|
# - type-as-html # broken, https://github.com/dart-lang/dartdoc/issues/3545
|
|
- missing-constant-constructor
|