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

Add crate-ci/typos config file with false positives. #1106

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

felixarntz
Copy link
Member

@felixarntz felixarntz commented Apr 1, 2024

Summary

It looks like our Spell Check underlying repository was updated and now complains about the word "dur", which however is intentional, as it abbreviates "duration" and is in fact a syntax requirement for the Server-Timing API. See failure here for reference: https://github.com/WordPress/performance/actions/runs/8513515250/job/23317345691?pr=1105

This fix is based on the documentation in https://github.com/crate-ci/typos?tab=readme-ov-file#false-positives

@felixarntz felixarntz added [Type] Bug An existing feature is broken Infrastructure Issues for the overall performance plugin infrastructure no milestone PRs that do not have a defined milestone for release labels Apr 1, 2024
@felixarntz felixarntz marked this pull request as ready for review April 1, 2024 20:55
Copy link

github-actions bot commented Apr 1, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: felixarntz <flixos90@git.wordpress.org>
Co-authored-by: joemcgill <joemcgill@git.wordpress.org>
Co-authored-by: mukeshpanchal27 <mukesh27@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@mukeshpanchal27 mukeshpanchal27 merged commit 40aff65 into trunk Apr 2, 2024
15 checks passed
@mukeshpanchal27 mukeshpanchal27 deleted the fix/spell-check-false-positives branch April 2, 2024 03:43
Copy link
Member

Choose a reason for hiding this comment

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

@felixarntz I think this file should have been placed under .github since it's being used in CI at the moment.

Copy link
Member Author

Choose a reason for hiding this comment

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

@thelovekesh Does the CI workflow automatically pick it up too if it's in the .github directory instead of the root directory?

Copy link
Member

Choose a reason for hiding this comment

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

@felixarntz I think we can use config argument:

diff --git a/.github/workflows/spell-check.yml b/.github/workflows/spell-check.yml
index 7fe8b067..cd468152 100644
--- a/.github/workflows/spell-check.yml
+++ b/.github/workflows/spell-check.yml
@@ -10,3 +10,5 @@ jobs:
       - uses: actions/checkout@v3
       - name: Search for misspellings
         uses: crate-ci/typos@master
+        with:
+          config: ./.github/typos.toml
Copy link
Member

Choose a reason for hiding this comment

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

Good. As at the moment this file is incorrectly getting included with the build since it isn't being ignored for export/dist, right?

Copy link
Member

Choose a reason for hiding this comment

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

Oh yes. But moving it to .github will fix that.

Copy link
Member Author

Choose a reason for hiding this comment

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

Feel free to open a follow up PR. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Infrastructure Issues for the overall performance plugin infrastructure no milestone PRs that do not have a defined milestone for release [Type] Bug An existing feature is broken
5 participants