-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
1 addition
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
01308b4
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.
I've add this https://cspell.org/ to a few of my projects, and been very happy with it, you'll need a dictionary of a few terms that are in the project, but great for preventing this sort of thing, runs in a few seconds in CI
01308b4
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.
Spell check is already part of our CI, courtsey of golangci-lint. This is how Matt caught it. See the lint failure in the earlier commit:
b7280e6
01308b4
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.
https://github.com/crate-ci/typos works better (than cspell)
01308b4
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.
As I said, typo checking is part of our CI, which is how we caught it. Our tooling already works.
01308b4
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.
I'm not saying you tooling doesn't work, or that you need to change anything
01308b4
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.
Actually, you should probably block the merges of the code with typos - but that is a policy issue, not a tooling issue
01308b4
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.
I don't think this code originated from a merge... but yeah it'd be nice if my local env was set up to flag typos before I commit :)
01308b4
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.
I meant merge as in PR - sometimes it is nice to lay some restrictions to prevent direct pushes into main branch - even for yourself. Github has very nice tooling for this nowadays with protected branches and such; I suggest giving it a try - might change your life :D
To that end - pre-commit stuff is a local optimization, while the repo ingest is truly a roadblock for introducing breaking code.
Also, still - try
typos
- it has a nice VS Code integration that actually works (https://marketplace.visualstudio.com/items?itemName=tekumara.typos-vscode), unlike CSpell that mostly just annoys you with false-positives.