Open afgriffiths opened 3 years ago
@pq @bwilkerson
See also #2731 for the avoid_classes_with_only_static_members
false negative. Not sure about the package_api_docs
issue...
The avoid_classes_with_only_static_members
issue has been fixed.
Same here, package_api_docs does not work sometimes...
As of https://github.com/dart-lang/linter/issues/3395, this lint is essentially a no-op. Assuming interest, we could revisit I think given the new workspace support. Alternatively we should deprecate and remove.
/fyi @bwilkerson @keertip
What is the difference between package_api_docs
and public_member_api_docs
? (The docs for those lints aren't very clear.)
Steps to Reproduce
Create a new Dart project (designed to be a consumable package). Add the following contents to
analysis_options.yaml
In
lib
create a new file calleddate_utils.dart
with the following contents (lifted straight from the bad example at the page for the avoid_classes_with_only_static_members lint):Expected behaviour
Running
dart analyze
in the directory should complain of a violation of both avoid_classes_with_only_static_members and package_api_docs since:DateUtils
is a class with only static membersdate_utils.dart
file contains no doc comments and it's publicly accessible (since it lives inlib
)Actual behaviour
Run
dart analyze
in the directory and observe that no violations are found.Environment Information
Dart Version: 2.12.3 Operating System: Windows 10 64-bit