From 3fa275702003c7764e6a99e36f659cd25207fd8c Mon Sep 17 00:00:00 2001 From: weasdown <34220924+weasdown@users.noreply.github.com> Date: Wed, 15 Jan 2025 16:11:27 +0000 Subject: [PATCH] fix: `nodoc` deprecation fix (#949) * Fix `nodoc` deprecation warning. Running "dart doc ." in `packages/win32` previously generated 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 is fixed by this commit, which replaces the deprecated `nodoc` option in `dartdoc_options.yaml` with a `@nodoc` annotation in `constants_nodoc.dart`. * Clarify comment --- packages/win32/dartdoc_options.yaml | 1 - packages/win32/lib/src/constants_nodoc.dart | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/win32/dartdoc_options.yaml b/packages/win32/dartdoc_options.yaml index 5b849e7ac..bf053b2ce 100644 --- a/packages/win32/dartdoc_options.yaml +++ b/packages/win32/dartdoc_options.yaml @@ -107,7 +107,6 @@ dartdoc: 'examples', ] showUndocumentedCategories: true - nodoc: ['lib/src/constants_nodoc.dart'] ignore: - broken-link - missing-from-search-index diff --git a/packages/win32/lib/src/constants_nodoc.dart b/packages/win32/lib/src/constants_nodoc.dart index 3da95d3bf..785b3786b 100644 --- a/packages/win32/lib/src/constants_nodoc.dart +++ b/packages/win32/lib/src/constants_nodoc.dart @@ -3,10 +3,6 @@ // *** NOTE: This file contains constants that we have chosen not to document, // mostly because their function is obvious, or because they are documented in // the public Microsoft Windows documentation online. -// -// This file (only) is excluded from dartdoc in `dartdoc_options.yaml`. By -// keeping non-documented constants in a separate file, we save ourselves the -// need to add the /// @nodoc modifier to every single constant in this file. // Contributors are invited and encouraged to submit comments for these // constants from the open source Microsoft documentation, such as @@ -16,6 +12,10 @@ // ignore_for_file: camel_case_types, constant_identifier_names // ignore_for_file: non_constant_identifier_names +// Do not document anything in this library. +/// @nodoc +library; + import 'dart:ffi'; import 'package:ffi/ffi.dart';