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

everywhere: replace double words #74650

Merged
merged 2 commits into from
Jun 22, 2024
Merged

Conversation

JordanYates
Copy link
Collaborator

@JordanYates JordanYates commented Jun 21, 2024

Treewide search and replace on a range of double word combinations:
* the the
* to to
* if if
* that that
* on on
* is is
* from from

Add double prepositions to the default spelling check list.

nashif
nashif previously approved these changes Jun 21, 2024
@nashif nashif added the Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. label Jun 21, 2024
aescolar
aescolar previously approved these changes Jun 21, 2024
@LingaoM
Copy link
Collaborator

LingaoM commented Jun 21, 2024

Learn by analogy: there are also to to, that that, for for, etc...

Copy link
Collaborator

@LingaoM LingaoM left a comment

Choose a reason for hiding this comment

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

to to, if if, that that, on on, is is
So I recommend filtering all words.

@kartben
Copy link
Collaborator

kartben commented Jun 21, 2024

I'm with @LingaoM , let's do even more if you don't mind, @JordanYates :)

You may also want to search more smartly, something like the\n\s+(?:\* )?the will give you things like:

  • to the result. The offset can be obtained by comparing the
    the reported temperature to a reference.
    This option does not apply to the LSM330DLHC.
  • * This function can be called zero or more times, passing a slice of the
    * the data. The hash is calculated using all the given pieces.
    * To calculate the hash call @c hash_compute().

@aescolar
Copy link
Member

aescolar commented Jun 21, 2024

to to, if if, that that, on on, is is

@LingaoM Please note that a PR should not be blocked to demand "more" fixes (https://docs.zephyrproject.org/latest/contribute/contributor_expectations.html#reviewer-expectations9.
If @JordanYates is kind enough to take it further that would be certainly very nice of him.
But this PR is improving something, and we cannot demand from contributors they spend their time fixing even more things just because we realize about them.

@LingaoM LingaoM self-requested a review June 21, 2024 10:43
kartben
kartben previously approved these changes Jun 21, 2024
Copy link
Collaborator

@kartben kartben left a comment

Choose a reason for hiding this comment

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

cool cool ❤️

aescolar
aescolar previously approved these changes Jun 21, 2024
kartben
kartben previously approved these changes Jun 21, 2024
@nashif
Copy link
Member

nashif commented Jun 21, 2024

hopefully this did not remove any valid wink wink occurances :-D

nashif
nashif previously approved these changes Jun 21, 2024
@Thalley
Copy link
Collaborator

Thalley commented Jun 21, 2024

Would it make sense to add this sort of check to CI?

Treewide search and replace on a range of double word combinations:
    * `the the`
    * `to to`
    * `if if`
    * `that that`
    * `on on`
    * `is is`
    * `from from`

Signed-off-by: Jordan Yates <jordan@embeint.com>
Add double prepositions to the default spelling check list.

Signed-off-by: Jordan Yates <jordan@embeint.com>
@JordanYates
Copy link
Collaborator Author

Would it make sense to add this sort of check to CI?

This PR includes an update to spelling.txt to try and catch these in the future.
It's not smart enough to catch a repetition across lines, but its what we have.

@nashif nashif merged commit 1ab4fe6 into zephyrproject-rtos:main Jun 22, 2024
56 checks passed
@JordanYates JordanYates deleted the 240621_the_the branch June 22, 2024 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants