-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Highlighting and error checking in Dartdoc code #3572
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
Comments
Added this to the Later milestone. |
Removed Area-Editor label. |
Added Analyzer-Hint label. |
Removed this from the Later milestone. |
Removed Oldschool-Milestone-Later label. |
This seems like it would be impossible to do without false positive warnings. The following code blocks, that might be found in Dartdoc comments, would produce false analyzer warnings:
This would also pull in package:markdown as a dependency to the analyzer. |
Close as infeasible for the reasons above? |
There are ways to make things better than they are, but I don't care that much whether we leave this as a reminder or close it. |
Changes: ``` > git log --format="%C(auto) %h %s" 28a2503..817e61d https://dart.googlesource.com/pub.git/+/817e61d9 Fix publishing (#3610) https://dart.googlesource.com/pub.git/+/97f638d0 PubToplevel.directory is never null. (#3587) https://dart.googlesource.com/pub.git/+/a3ee2099 Make binstubs offset invariant (#3586) https://dart.googlesource.com/pub.git/+/67e44b4b Make >=2.12 <3.0.0 compatible with dart 3 (#3572) https://dart.googlesource.com/pub.git/+/c287c110 Warn on `pub publish` if `dart analyze` has messages (#3568) https://dart.googlesource.com/pub.git/+/29d7d868 Cleaner pubspec.lock parsing (#3487) ``` Diff: https://dart.googlesource.com/pub.git/+/28a2503d7f4806e6854e3ed0d783f065abfd1b5f~..817e61d9eb174f77dfd2cb1d1de45826f66ac6bf/ Change-Id: I203963479a2bb78db80d8e645066a227febeef46 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264680 Commit-Queue: Sigurd Meldgaard <[email protected]> Reviewed-by: Jonas Jensen <[email protected]>
We often have code examples in DartDoc. They get out of sync with the actual code very easily, and are harder to read because they aren't syntax highlighted. It would be really nice if the editor could recognize code fragments in DartDoc comments and do syntax highlighting and error checking on them. There are already mechanisms that DartDoc uses to indicate code fragments, so this ought to be recognizable. There might be an issue with needing to recognize that this code isn't actually part of the file, as it might break, or two different code fragments might define a function with the same name, so each needs to be treated somewhat separately, and not compiled as part of the file. But it would be really really nice.
The text was updated successfully, but these errors were encountered: