Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@cbracken
Copy link
Member

We made the Dart 'new' keyword optional years ago, but appears we missed
removing it in a few doc comments.

No tests since only comments changed.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on
    writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

We made the Dart 'new' keyword optional years ago, but appears we missed
removing it in a few doc comments.
@cbracken cbracken requested a review from gspencergoog April 20, 2022 23:20
@flutter-dashboard flutter-dashboard bot added the platform-web Code specifically for the web engine label Apr 20, 2022
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@Hixie
Copy link
Contributor

Hixie commented Apr 20, 2022

test-exempt: only affects comments

but this is totally testable, actually. @gspencergoog did a ton of work to make all the framework tests get fully analyzed and even gave us the ability to give them unit tests, if i'm not mistaken. maybe we can extend that logic to this repo?

@cbracken
Copy link
Member Author

Was just asking about exactly that. Would be great to avoid any more sneaking in. This was an "oh hey there are new keywords there" while fixing an "oh hey there are std::unique_ptr(new ...) where there could be std::make_unique here" noticed while pair-reading some code for totally un-new-related reasons. Would love to get this analyzed/linted.

Copy link
Contributor

@gspencergoog gspencergoog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

32384589-a60f0e74-c078-11e7-9bc1-e5b5287aea9d

@cbracken cbracken added the waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. label Apr 21, 2022
@cbracken cbracken merged commit d819872 into flutter:main Apr 21, 2022
@cbracken cbracken deleted the remove-new-from-docs branch April 21, 2022 00:08
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 21, 2022
@gspencergoog
Copy link
Contributor

gspencergoog commented Apr 21, 2022

This is the only kind of code we don't analyze, because there's not enough context to make it analyzable. These can't be analyzed because these blocks are meant to have an arbitrarily small snippet of code in them, including "bad" examples where the code isn't meant to analyze cleanly.

The best solution here would be to convert them to {@tool snippet} blocks, which would put a blue box around them, but would cause them to be analyzed with the rest of the sample code.

Perhaps we need a new kind of "@tool" configuration that will cause the wrapped code to be analyzed, but not treated terribly differently (visually) from the bare markdown escapes.

@Hixie

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

needs tests platform-web Code specifically for the web engine waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants