@@ -170,15 +170,14 @@ class PackageGraph with CommentReferable, Nameable {
170170 e.canonicalModelElement == null ||
171171 e is Library ||
172172 e.enclosingElement! .isCanonical) {
173- for (var d in e.documentationFrom
174- .where ((d) => d.hasDocumentationComment)) {
173+ for (var d
174+ in e.documentationFrom .where ((d) => d.hasDocumentationComment)) {
175175 if (d.needsPrecache && ! precachedElements.contains (d)) {
176176 precachedElements.add (d as ModelElement );
177177 futures.add (d.precacheLocalDocs ());
178178 // [TopLevelVariable]s get their documentation from getters and
179179 // setters, so should be precached if either has a template.
180- if (e is TopLevelVariable &&
181- ! precachedElements.contains (e)) {
180+ if (e is TopLevelVariable && ! precachedElements.contains (e)) {
182181 precachedElements.add (e);
183182 futures.add (e.precacheLocalDocs ());
184183 }
@@ -647,7 +646,8 @@ class PackageGraph with CommentReferable, Nameable {
647646 checkAndAddContainer (modelElement, container);
648647 }
649648 } else if (container is Mixin ) {
650- for (var modelElement in container.superclassConstraints.modelElements) {
649+ for (var modelElement
650+ in container.superclassConstraints.modelElements) {
651651 checkAndAddContainer (modelElement, container);
652652 }
653653 }
@@ -752,8 +752,7 @@ class PackageGraph with CommentReferable, Nameable {
752752 // TODO(keertip): Find a better way to exclude members of extensions
753753 // when libraries are specified using the "--include" flag.
754754 if (library != null && library.isDocumented) {
755- return getModelFor (e, library,
756- enclosingContainer: preferredClass);
755+ return getModelFor (e, library, enclosingContainer: preferredClass);
757756 }
758757 }
759758 // TODO(jcollins-g): The data structures should be changed to eliminate
@@ -778,8 +777,7 @@ class PackageGraph with CommentReferable, Nameable {
778777 var setterElement = setter2 == null
779778 ? null
780779 : getModelFor (setter2, library) as Accessor ;
781- canonicalModelElement = getModelForPropertyInducingElement (
782- e, library,
780+ canonicalModelElement = getModelForPropertyInducingElement (e, library,
783781 getter: getterElement, setter: setterElement);
784782 } else {
785783 canonicalModelElement = getModelFor (e, library);
@@ -791,8 +789,7 @@ class PackageGraph with CommentReferable, Nameable {
791789 }
792790 }
793791 // Prefer fields and top-level variables.
794- if (e is PropertyAccessorElement2 &&
795- canonicalModelElement is Accessor ) {
792+ if (e is PropertyAccessorElement2 && canonicalModelElement is Accessor ) {
796793 canonicalModelElement = canonicalModelElement.enclosingCombo;
797794 }
798795 return canonicalModelElement;
@@ -804,8 +801,8 @@ class PackageGraph with CommentReferable, Nameable {
804801 var elem = modelElement.element;
805802 var candidates = < ModelElement > {};
806803 if (lib != null ) {
807- var constructedWithKey = allConstructedModelElements[
808- ConstructedModelElementsKey (elem, null )];
804+ var constructedWithKey =
805+ allConstructedModelElements[ ConstructedModelElementsKey (elem, null )];
809806 if (constructedWithKey != null ) {
810807 candidates.add (constructedWithKey);
811808 }
@@ -909,38 +906,6 @@ class PackageGraph with CommentReferable, Nameable {
909906 return allElements;
910907 }
911908
912- /// Cache of 'nodoc' configurations.
913- ///
914- /// Glob lookups can be expensive, so cache per filename.
915- final _configSetsNodocFor = HashMap <String , bool >();
916-
917- /// Given an element's [fullName] , look up the nodoc configuration data and
918- /// determine whether to unconditionally treat the element as "nodoc", an
919- /// attribute indicating that documentation should not be included in
920- /// dartdoc's generated output.
921- ///
922- /// This configuration setting is deprecated.
923- bool configSetsNodocFor (String fullName) {
924- return _configSetsNodocFor.putIfAbsent (fullName, () {
925- var file = resourceProvider.getFile (fullName);
926- // Direct lookup instead of generating a custom context will save some
927- // cycles. We can't use the element's [DartdocOptionContext] because that
928- // might not be where the element was defined, which is what's important
929- // for nodoc's semantics. Looking up the defining element just to pull
930- // a context is again, slow.
931- var globs = (config.optionSet['nodoc' ].valueAt (file.parent) as List )
932- .cast <String >();
933- if (globs.isNotEmpty) {
934- packageGraph.defaultPackage.warn (
935- PackageWarning .deprecated,
936- message:
937- "The '--nodoc' option is deprecated, and will soon be removed." ,
938- );
939- }
940- return utils.matchGlobs (globs, fullName);
941- });
942- }
943-
944909 /// Returns a macro by [name] , or `null` if no macro is found.
945910 String ? getMacro (String name) {
946911 assert (_localDocumentationBuilt);
0 commit comments