Skip to content
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

Deprecate the missingCodeBlockLanguage warning. #3743

Merged
merged 5 commits into from
Apr 8, 2024

Conversation

kallentu
Copy link
Member

@kallentu kallentu commented Apr 5, 2024

Deprecates the missingCodeBlockLanguage warning. This will be replaced by the missing_code_block_language_in_doc_comment lint.

This is a part of the effort to move more Dartdoc logic to the analyzer/linter.

See lint proposal here: dart-lang/linter#4904


  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

@kallentu kallentu marked this pull request as ready for review April 8, 2024 14:06
@kallentu kallentu requested a review from srawlins April 8, 2024 14:06
@kallentu
Copy link
Member Author

kallentu commented Apr 8, 2024

@srawlins Is there anything else we need to mark for warning deprecations?

@srawlins
Copy link
Member

srawlins commented Apr 8, 2024

Hmm it would be good to report the warning as deprecated, if enabled. It looks like that might be here (for enabling as an error) and here (for enabling as a warning).

If you add a _isDeprecated field to PackageWarning, then it should be pretty easy to check.

However, what does "report" mean? In our advanced warnings system, this is the code that sets up whether various checks are "warning" or "ignore" or "error", so it seems like you'd run into problems quick if you tried to report a warning about enabling a warning while setting up warnings. 😟 So... maybe you can just print to stderr or stdout and call it a day. 😀

@kallentu kallentu force-pushed the deprecate-missinglang-warning branch from 32a45ec to 68c5fbf Compare April 8, 2024 19:35
@kallentu
Copy link
Member Author

kallentu commented Apr 8, 2024

Yeah it seemed odd to report on a warning report.
Anyways, added a stderr, feel free to take a look

lib/src/model/documentation_comment.dart Show resolved Hide resolved
lib/src/warnings.dart Outdated Show resolved Hide resolved
@kallentu kallentu merged commit 28d0dab into main Apr 8, 2024
11 checks passed
@kallentu kallentu deleted the deprecate-missinglang-warning branch April 8, 2024 20:47
copybara-service bot pushed a commit to dart-lang/sdk that referenced this pull request Apr 9, 2024
… file, glob, http, http_multi_server, http_parser, json_rpc_2, package_config, protobuf, pub_semver, source_maps, source_span, test, usage, vector_math, web, webdev

Revisions updated by `dart tools/rev_sdk_deps.dart`.

args (https://github.com/dart-lang/args/compare/788d935..b2e2224):
  b2e2224  2024-04-01  dependabot[bot]  Bump actions/checkout from 4.1.1 to 4.1.2 (dart-lang/args#266)

bazel_worker (https://github.com/dart-lang/bazel_worker/compare/8619b92..79d2ad1):
  79d2ad1  2024-04-01  dependabot[bot]  Bump actions/checkout from 4.1.1 to 4.1.2 (dart-lang/bazel_worker#88)

benchmark_harness (https://github.com/dart-lang/benchmark_harness/compare/c8a0c8b..d23112a):
  d23112a  2024-04-01  dependabot[bot]  Bump actions/checkout from 4.1.1 to 4.1.2 (dart-lang/benchmark_harness#101)

dartdoc (https://github.com/dart-lang/dartdoc/compare/bf6080c..28d0dab):
  28d0dabb  2024-04-08  Kallen Tu  Deprecate the `missingCodeBlockLanguage` warning. (dart-lang/dartdoc#3743)
  12988e06  2024-04-03  Sam Rawlins  Tidy some comments (dart-lang/dartdoc#3741)
  2559a774  2024-04-03  Sam Rawlins  Rewrite the 'exported extension method' tests; add basic extension tests. (dart-lang/dartdoc#3738)
  b45174e8  2024-04-03  Sam Rawlins  Correct a small unnecessary chunk in Library.allClasses (dart-lang/dartdoc#3742)
  95305c3e  2024-04-03  Sam Rawlins  Simplify GeneratorFrontend (dart-lang/dartdoc#3739)
  a97508da  2024-04-03  Sam Rawlins  Remove a TODO in Accessor.characterLocation (dart-lang/dartdoc#3740)

ecosystem (https://github.com/dart-lang/ecosystem/compare/5a900ca..de03da1):
  de03da1  2024-04-01  dependabot[bot]  Bump actions/checkout from 4.1.1 to 4.1.2 (dart-lang/ecosystem#248)
  001e06f  2024-04-01  dependabot[bot]  Bump actions/download-artifact from 4.1.3 to 4.1.4 (dart-lang/ecosystem#247)
  3dc115b  2024-04-01  dependabot[bot]  Bump subosito/flutter-action from 2.13.0 to 2.15.0 (dart-lang/ecosystem#246)
  7687fb0  2024-04-01  dependabot[bot]  Bump peter-evans/create-or-update-comment (dart-lang/ecosystem#249)
  915840a  2024-04-01  dependabot[bot]  Bump actions/cache from 4.0.0 to 4.0.2 (dart-lang/ecosystem#245)

file (https://github.com/google/file.dart/compare/3aa0649..f858c6f):
  f858c6f  2024-04-01  dependabot[bot]  Bump actions/checkout from 4.1.1 to 4.1.2 (dart-archive/file.dart#237)

glob (https://github.com/dart-lang/glob/compare/379d60c..25ee2c2):
  25ee2c2  2024-04-01  dependabot[bot]  Bump actions/checkout from 4.1.1 to 4.1.2 (dart-lang/glob#89)

http (https://github.com/dart-lang/http/compare/5214f76..caad9ca):
  caad9ca  2024-04-04  Brian Quinlan  Create a `package:web_socket` `WebSocket` from `dart:io` `WebSocket` (dart-lang/http#1173)

http_multi_server (https://github.com/dart-lang/http_multi_server/compare/ba9d07f..6ce0a13):
  6ce0a13  2024-04-01  dependabot[bot]  Bump actions/checkout from 4.1.1 to 4.1.2 (dart-lang/http_multi_server#65)

http_parser (https://github.com/dart-lang/http_parser/compare/84db8b0..8ffcaec):
  8ffcaec  2024-04-01  dependabot[bot]  Bump actions/checkout from 4.1.1 to 4.1.2 (dart-lang/http_parser#87)

json_rpc_2 (https://github.com/dart-lang/json_rpc_2/compare/639857b..1a4c473):
  1a4c473  2024-04-01  dependabot[bot]  Bump actions/checkout from 4.1.1 to 4.1.2 (dart-lang/json_rpc_2#110)

package_config (https://github.com/dart-lang/package_config/compare/3d90e69..486cc4b):
  486cc4b  2024-04-01  dependabot[bot]  Bump actions/checkout from 4.1.1 to 4.1.2 (dart-lang/package_config#150)

protobuf (https://github.com/dart-lang/protobuf/compare/b761358..ccf104d):
  ccf104d  2024-04-01  dependabot[bot]  Bump actions/checkout from 3.6.0 to 4.1.2 (google/protobuf.dart#927)
  15b9c87  2024-04-01  dependabot[bot]  Bump actions/cache from 4.0.1 to 4.0.2 (google/protobuf.dart#926)

pub_semver (https://github.com/dart-lang/pub_semver/compare/3175ba0..7581029):
  7581029  2024-04-01  dependabot[bot]  Bump actions/checkout from 4.1.1 to 4.1.2 (dart-lang/pub_semver#99)

source_maps (https://github.com/dart-lang/source_maps/compare/55e92a4..64d07fa):
  64d07fa  2024-04-01  dependabot[bot]  Bump actions/checkout from 4.1.1 to 4.1.2 (dart-lang/source_maps#87)

source_span (https://github.com/dart-lang/source_span/compare/21a403a..45e11a3):
  45e11a3  2024-04-01  dependabot[bot]  Bump actions/checkout from 4.1.1 to 4.1.2 (dart-lang/source_span#108)

test (https://github.com/dart-lang/test/compare/2b1ed13..14d820f):
  14d820f0  2024-04-08  Nate Bosch  Prepare to publish (dart-lang/test#2207)

usage (https://github.com/dart-lang/usage/compare/67ecd7d..09cab89):
  09cab89  2024-04-02  dependabot[bot]  Bump actions/checkout from 4.1.1 to 4.1.2 (dart-archive/usage#203)

vector_math (https://github.com/google/vector_math.dart/compare/7e705f7..43f2a77):
  43f2a77  2024-04-01  dependabot[bot]  Bump actions/checkout from 4.1.1 to 4.1.2 (google/vector_math.dart#318)

web (https://github.com/dart-lang/web/compare/e773de9..3d1b4cb):
  3d1b4cb  2024-04-02  Kashiwa  Fix the links in third_party/mdn/README.md (dart-lang/web#219)

webdev (https://github.com/dart-lang/webdev/compare/4067462..7d0d2d4):
  7d0d2d46  2024-04-05  Elliott Brooks  Can add breakpoints to a project using macros (dart-lang/webdev#2403)
  d715bcd7  2024-04-05  Elliott Brooks  Webdev integration_test should not check for string messages that come from pub (dart-lang/webdev#2405)
  29d6ab8e  2024-04-01  dependabot[bot]  Bump actions/cache from 4.0.1 to 4.0.2 (dart-lang/webdev#2401)
  37491228  2024-04-01  dependabot[bot]  Bump actions/checkout from 4.1.1 to 4.1.2 (dart-lang/webdev#2402)

Change-Id: Id649f7a29dacdba0855c512978feb1d52d4c5313
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/362060
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants