这是indexloc提供的服务,不要输入任何密码
Skip to content

Fix typos #82319

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

Merged
merged 1 commit into from
May 13, 2021
Merged

Fix typos #82319

merged 1 commit into from
May 13, 2021

Conversation

jmewes
Copy link
Contributor

@jmewes jmewes commented May 12, 2021

Fix to typos in the documentation.

@flutter-dashboard flutter-dashboard bot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. c: contributor-productivity Team-specific productivity, code health, technical debt. labels May 12, 2021
@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.

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.

@google-cla google-cla bot added the cla: yes label May 12, 2021
Copy link
Member

@xu-baolin xu-baolin left a comment

Choose a reason for hiding this comment

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

LGTM

@xu-baolin
Copy link
Member

I am curious that what causes us 'to to' typos, I had seen the same typos before.

@jmewes
Copy link
Contributor Author

jmewes commented May 12, 2021

I am curious that what causes us 'to to' typos, I had seen the same typos before.

I would say that "double word typos" are a common typing error. When I do such mistakes, I guess it happens like this:

  1. Start writing a sentence
  2. Think about the bigger picture
  3. Finish writing the sentence

In step 3 I forgot where I stopped typing.

Automated checks

In this pull request @Hixie considered whether it actually might be a good idea to run tests for this kind of error: #81325

It could be done with scripts like this:

Do you already have static code analysis scripts as part of the build process?

Prototype

I don't know whether it makes sense to introduce such a tool, but the "double word error" seems like being present a few times more.

laptop-jm:flutter (stable) janux$ time find . -name "*.dart" | xargs -n 1 pcregrep -Min --color=auto '\b([^[:space:]]+)[[:space:]]+\1\b' | grep "///" > /tmp/potential-double-word-typos.txt

real	0m3,129s
user	0m2,714s
sys	0m0,740s

Result (including false positives but also a dozen double word errors):

potential-double-word-typos.txt

@Hixie
Copy link
Contributor

Hixie commented May 12, 2021

test-exempt: only affects comments

@fluttergithubbot fluttergithubbot merged commit b1c1bdb into flutter:master May 13, 2021
@jmewes jmewes deleted the housekeeping/2021-05-12 branch May 13, 2021 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: contributor-productivity Team-specific productivity, code health, technical debt. f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants