Skip to content

fix: nodoc deprecation warning #948

@weasdown

Description

@weasdown

Description

Running dart doc . in packages/win32 generates a warning that:

warning: deprecated dartdoc usage: The '--nodoc' option is deprecated, and will soon be removed.
    from package-win32: file:///C:/Users/weasd/Downloads/forks/win32/packages/win32

This also affects any package that depends on win32, as dart doc . includes dependencies by default.

The cause for this is the nodoc option in packages/win32/dartdoc_options.yaml, which is deprecated. Instead, we can add a @nodoc annotation in any files we want to exclude. Note that we do not have to include the @nodoc annotation on every line, only at the top of the file as a library annotation.

Steps To Reproduce

From a fresh clone of the repo:

  1. Run cd packages/win32
  2. Run dart doc .
  3. Note that the fifth line in the output warns about use of the nodoc option:
Documenting win32...
Discovering libraries...
Linking elements...
Precaching local docs for 296038 elements...
  warning: deprecated dartdoc usage: The '--nodoc' option is deprecated, and will soon be removed.
    from package-win32: file:///C:/Users/weasd/Downloads/win32/packages/win32
Initialized dartdoc with 327 libraries
Generating docs for category kernel32 from package:win32...

Expected Behavior

No nodoc deprecation warning when running dart doc ..

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working as expected

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions