-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pana may wish to consider docs coverage in the score (or at least list as a warning) #269
Comments
I think this could be part of the code health (vs. the other option is maintenance). Question: given a package with great documentation with 100/100 health score, if you'd remove all of the API docs, how much would you decrease its score? What would be a "fair" percentage for it? |
90/100? There's a tradeoff between encouraging doc comments and people gaming the system by writing unhelpful doc comments just to increase the score. |
For the first iteration, we could do the following
This does not handle empty documentation, nor does it take the method size into account, e.g. the following will be counted as one missing API entry point out of the many...
|
FYI: |
How hard should we be on packages that don't rely on dartdoc-generated docs as their primary reference docs? I'm thinking of angular_components, which relies on the gallery at https://dart-lang.github.io/angular_components_example rather than API docs, since you usually use the components via HTML rather than Dart. I suppose we can detect these packages by whether they have a non-blank /cc @nshahan @TedSander |
Thinking about this some more, there's a hierarchy of doc importance:
|
I see a lot of instances where a library contains a single class. Typically there isn't a library doc. All the documentation is on the class. @kwalrath WDYT? |
@nshahan I can see how that might be reasonable for packages that have tons of very small libraries, where the API isn't primarily Dart. It's not a great experience for people who happen to find the package or library docs, though. |
I have a very early-version PoC of using The catch is: the analysis part (building the PackageGraph in dartdoc) takes over a minute for a package like The balancing act here is that we want the analysis upgrades to be fast (e.g. when there is a version / data schema change), and it needs to be figured out how this can be done on the pub site's scale. (/cc @jakobr-google) |
Maybe we have another score that is the doc score and we separate that out from pana. Pana is relatively straight-forward now. Adding One could argue |
Good points! There is also the potential that we can introduce new scoring segments in the near future, so it would be worth to re-think how we shall store and update the scores. |
Follow-up: I'm implementing a data extraction from |
ack
…On Wed, Jun 6, 2018 at 7:15 AM István Soós ***@***.***> wrote:
Follow-up: I'm implementing a data extraction from package:dartdoc in
dart-lang/pub-dev#1353
<dart-lang/pub-dev#1353>. This will be
the basis of the dartdoc coverage score (and also the input for search),
but it won't be through pana.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#269 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AABCikjHt6VS8BUC6P3Th0MTQp4idF48ks5t5-PpgaJpZM4SufgP>
.
|
This has been implemented for a while now. |
Flutter for example tracks that all public members in
flutter/flutter
are documented.flutter analyze --flutter-repo --dartdocs
is the command we use.Which just turns on:
http://dart-lang.github.io/linter/lints/package_api_docs.html
The text was updated successfully, but these errors were encountered: