Skip to content

Commit

Permalink
I'm so tired of typos
Browse files Browse the repository at this point in the history
  • Loading branch information
mholt committed Jun 2, 2024
1 parent b7280e6 commit 01308b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/caddytls/acmeissuer.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ func (iss *ACMEIssuer) Revoke(ctx context.Context, cert certmagic.CertificateRes
// to be accessed and manipulated.
func (iss *ACMEIssuer) GetACMEIssuer() *ACMEIssuer { return iss }

// GetRenewalInfo wraps the underlying GetRenewalInfo method and satisifes
// GetRenewalInfo wraps the underlying GetRenewalInfo method and satisfies
// the CertMagic interface for ARI support.
func (iss *ACMEIssuer) GetRenewalInfo(ctx context.Context, cert certmagic.Certificate) (acme.RenewalInfo, error) {
return iss.issuer.GetRenewalInfo(ctx, cert)
Expand Down

8 comments on commit 01308b4

@mcfedr
Copy link
Contributor

@mcfedr mcfedr commented on 01308b4 Jun 13, 2024

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

@mohammed90
Copy link
Member

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

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

@MOZGIII
Copy link

@MOZGIII MOZGIII commented on 01308b4 Sep 19, 2024

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)

@mohammed90
Copy link
Member

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.

@MOZGIII
Copy link

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

@MOZGIII
Copy link

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

@mholt
Copy link
Member Author

@mholt mholt commented on 01308b4 Sep 19, 2024

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 :)

@MOZGIII
Copy link

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.

Please sign in to comment.