-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Add typos checks #36874
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 typos checks #36874
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,158 @@ | ||||||||||||||||||||
| # Typos (crate-ci/typos) configuration. | ||||||||||||||||||||
| # Words we cannot fix (e.g. API stability, external names) must be allow-listed below | ||||||||||||||||||||
| # with a comment explaining why. Alternatively add "# typos:disable" or "// typos:disable" | ||||||||||||||||||||
| # on the same line in source to disable the check for that line only. | ||||||||||||||||||||
|
|
||||||||||||||||||||
| [files] | ||||||||||||||||||||
| # Exclude paths that are not spell-checked (match SPELLCHECK_FILES and .gitignore) | ||||||||||||||||||||
| extend-exclude = [ | ||||||||||||||||||||
| "CHANGELOG*.md", | ||||||||||||||||||||
| "pnpm-lock.yaml", | ||||||||||||||||||||
| "go.sum", | ||||||||||||||||||||
| "uv.lock", | ||||||||||||||||||||
| "*.min.js", | ||||||||||||||||||||
| "*.min.css", | ||||||||||||||||||||
| "public/assets", | ||||||||||||||||||||
| "modules/migration/bindata.*", | ||||||||||||||||||||
| "modules/options/bindata.*", | ||||||||||||||||||||
| "modules/public/bindata.*", | ||||||||||||||||||||
| "modules/templates/bindata.*", | ||||||||||||||||||||
| ".make_evidence", | ||||||||||||||||||||
| "options/gitignore/Typo3", | ||||||||||||||||||||
| "options/locale", | ||||||||||||||||||||
| "assets/misspellings.csv", | ||||||||||||||||||||
| "tests/*.ini.tmpl", | ||||||||||||||||||||
| "tests/*.ini", | ||||||||||||||||||||
| "routers/private/tests/repos/repo1_hook_verification_dummy_gpg_key.txt", | ||||||||||||||||||||
| "routers/private/tests/repos/repo1_hook_verification", | ||||||||||||||||||||
| "SECURITY.md", | ||||||||||||||||||||
| "options/label", | ||||||||||||||||||||
| "contrib/init/sunos", | ||||||||||||||||||||
| "tools/generate-svg-vscode-extensions.json", | ||||||||||||||||||||
| "web_src/fomantic", | ||||||||||||||||||||
| ] | ||||||||||||||||||||
|
|
||||||||||||||||||||
| [default] | ||||||||||||||||||||
| # Ignore lines that contain a disable comment (use when a typo cannot be fixed) | ||||||||||||||||||||
| extend-ignore-re = [ | ||||||||||||||||||||
| "(?m)^.*#\\s*typos:disable.*$", | ||||||||||||||||||||
| "(?m)^.*//\\s*typos:disable.*$", | ||||||||||||||||||||
| "(?m)^.*<!--\\s*typos:disable\\s*-->.*$", | ||||||||||||||||||||
| ] | ||||||||||||||||||||
|
|
||||||||||||||||||||
| [default.extend-words] | ||||||||||||||||||||
| # Project name; cannot change | ||||||||||||||||||||
| Gitea = "Gitea" | ||||||||||||||||||||
| gitea = "gitea" | ||||||||||||||||||||
| # TypoScript is a CMS project name, not a typo of TypeScript | ||||||||||||||||||||
| TypoScript = "TypoScript" | ||||||||||||||||||||
| # Meilisearch ranking rule name | ||||||||||||||||||||
| typo = "typo" | ||||||||||||||||||||
| # TYPO3 CMS project name | ||||||||||||||||||||
| TYPO3 = "TYPO3" | ||||||||||||||||||||
| Typo3 = "Typo3" | ||||||||||||||||||||
|
Comment on lines
+47
to
+53
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. dead rules? |
||||||||||||||||||||
| # SMTP HELO command (RFC 5321); protocol term | ||||||||||||||||||||
| helo = "helo" | ||||||||||||||||||||
| Helo = "Helo" | ||||||||||||||||||||
| HELO = "HELO" | ||||||||||||||||||||
|
Comment on lines
+55
to
+57
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. one of them should be enough |
||||||||||||||||||||
| # File extension / format name (e.g. Clojure edn, Makefile .mak) | ||||||||||||||||||||
| edn = "edn" | ||||||||||||||||||||
| mak = "mak" | ||||||||||||||||||||
| cpy = "cpy" | ||||||||||||||||||||
| odf = "odf" | ||||||||||||||||||||
|
Comment on lines
+58
to
+62
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||
| # SunOS SMF framework property name | ||||||||||||||||||||
| startd = "startd" | ||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's ignored though? |
||||||||||||||||||||
| # TLS cipher name (3DES EDE); crypto standard | ||||||||||||||||||||
| ede = "ede" | ||||||||||||||||||||
| # Local variable name in bleve query; changing would alter behavior | ||||||||||||||||||||
| tru = "tru" | ||||||||||||||||||||
| # Abbreviation for TABLE in CLI usage text | ||||||||||||||||||||
| TABL = "TABL" | ||||||||||||||||||||
| # Both spellings exist; keep for API stability | ||||||||||||||||||||
| Unparseable = "Unparseable" | ||||||||||||||||||||
| unparseable = "unparseable" | ||||||||||||||||||||
| # i18n key used in all locale files; cannot change key | ||||||||||||||||||||
| enterred = "enterred" | ||||||||||||||||||||
| # Substring in base64 or test data (false positive) | ||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No. Don't do this. |
||||||||||||||||||||
| Ot = "Ot" | ||||||||||||||||||||
| nd = "nd" | ||||||||||||||||||||
| Nd = "Nd" | ||||||||||||||||||||
| ND = "ND" | ||||||||||||||||||||
| iy = "iy" | ||||||||||||||||||||
| Iy = "Iy" | ||||||||||||||||||||
| ba = "ba" | ||||||||||||||||||||
| BA = "BA" | ||||||||||||||||||||
| Pn = "Pn" | ||||||||||||||||||||
| Iz = "Iz" | ||||||||||||||||||||
| ue = "ue" | ||||||||||||||||||||
| Ue = "Ue" | ||||||||||||||||||||
| Mis = "Mis" | ||||||||||||||||||||
| Ser = "Ser" | ||||||||||||||||||||
| Yto = "Yto" | ||||||||||||||||||||
| fo = "fo" | ||||||||||||||||||||
| ist = "ist" | ||||||||||||||||||||
| Ein = "Ein" | ||||||||||||||||||||
| noo = "noo" | ||||||||||||||||||||
| oder = "oder" | ||||||||||||||||||||
| ono = "ono" | ||||||||||||||||||||
| ags = "ags" | ||||||||||||||||||||
| alle = "alle" | ||||||||||||||||||||
| ALLWAYS = "ALLWAYS" | ||||||||||||||||||||
|
Comment on lines
+76
to
+100
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. while typos has indeed problem with base64 this is not a good approach. |
||||||||||||||||||||
| caf = "caf" | ||||||||||||||||||||
| claus = "claus" | ||||||||||||||||||||
| Claus = "Claus" | ||||||||||||||||||||
| rcall = "rcall" | ||||||||||||||||||||
|
Comment on lines
+101
to
+104
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||
| # util.Iif ternary helper and TestTemplateIif; public API | ||||||||||||||||||||
| Iif = "Iif" | ||||||||||||||||||||
| # JSON tag "commiter" in structs/repo_wiki.go and swagger; API compatibility | ||||||||||||||||||||
| commiter = "commiter" | ||||||||||||||||||||
| # Variable from m.GetFrom() in mailer; API | ||||||||||||||||||||
| froms = "froms" | ||||||||||||||||||||
| # Variable name in jobparser model (plural of data) | ||||||||||||||||||||
| datas = "datas" | ||||||||||||||||||||
| # Patch line in diff tests ("+--some coment 2"); test fixture | ||||||||||||||||||||
| coment = "coment" | ||||||||||||||||||||
| # Migration comment; leave as-is to avoid touching migration | ||||||||||||||||||||
| goint = "goint" | ||||||||||||||||||||
| # File extension / icon name in material-icon-rules.json | ||||||||||||||||||||
| stap = "stap" | ||||||||||||||||||||
|
Comment on lines
+117
to
+118
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||
| styl = "styl" | ||||||||||||||||||||
| tese = "tese" | ||||||||||||||||||||
| # Test filename "shouldbe.vendor" in git attribute tests | ||||||||||||||||||||
| shouldbe = "shouldbe" | ||||||||||||||||||||
| # Variable name in repo/issue.go labels split | ||||||||||||||||||||
| splitted = "splitted" | ||||||||||||||||||||
| # Template comment "indivdual user"; leave to avoid template churn | ||||||||||||||||||||
| indivdual = "indivdual" | ||||||||||||||||||||
| # Module name and API (interpeter.go, NewInterpeter); public API | ||||||||||||||||||||
| interpeter = "interpeter" | ||||||||||||||||||||
| Interpeter = "Interpeter" | ||||||||||||||||||||
| # Old package_property name in migration (rpm.metdata → rpm.metadata) | ||||||||||||||||||||
| metdata = "metdata" | ||||||||||||||||||||
| # block.PrecendingCharacter() from markup library; external API | ||||||||||||||||||||
| Precending = "Precending" | ||||||||||||||||||||
| # Migration function RemoveLabelUneededCols; cannot rename | ||||||||||||||||||||
| Uneeded = "Uneeded" | ||||||||||||||||||||
| # Emoji shortcode "womens" (women's room) in emoji_data.go | ||||||||||||||||||||
| womens = "womens" | ||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||
| # ARIA attribute aria-activedescendant; HTML standard | ||||||||||||||||||||
| actived = "actived" | ||||||||||||||||||||
| Actived = "Actived" | ||||||||||||||||||||
|
Comment on lines
+138
to
+140
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. bad comment, all the mentions I see refer to dropped column in database. |
||||||||||||||||||||
| # Part of determineSHAforPR; public API | ||||||||||||||||||||
| Afor = "Afor" | ||||||||||||||||||||
| # "plastic.branchexplorer" in fileicon rules; external tool name | ||||||||||||||||||||
| branche = "branche" | ||||||||||||||||||||
| # Abbreviation or identifier; keep for compatibility | ||||||||||||||||||||
| Colum = "Colum" | ||||||||||||||||||||
| # Credentials-related identifier; keep for compatibility | ||||||||||||||||||||
| Credental = "Credental" | ||||||||||||||||||||
| # Identifier (e.g. global); keep for compatibility | ||||||||||||||||||||
| gloabl = "gloabl" | ||||||||||||||||||||
|
|
||||||||||||||||||||
| [default.extend-identifiers] | ||||||||||||||||||||
| # util.Iif is ternary helper; cannot change: public API | ||||||||||||||||||||
| Iif = "Iif" | ||||||||||||||||||||
| iif = "iif" | ||||||||||||||||||||
| # determineSHAforPR function name; cannot change: public API | ||||||||||||||||||||
| SHAforPR = "SHAforPR" | ||||||||||||||||||||
| Afor = "Afor" | ||||||||||||||||||||
|
Comment on lines
+152
to
+158
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. dead rules? |
||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No action-only checks please. Run it during
make lint-spelland remove this step. That way it can be ran locally which is very important.You probably need to add a
cargo.tomlto pin this tool dependency, similar to what we already do for python usingpyproject.toml.Also if possible integrate it into
make lint-spell-fixto automatically fix all errors.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lint-typos was added in the PR so it's runnable locally. Not sure why it's a separate rule and it doesn't cover installation (which I don't mind) but it does exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I missed that, was only seeing this.