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

feat(markdown): support codespell #229

Merged
merged 1 commit into from
May 29, 2024
Merged

Conversation

hougesen
Copy link
Owner

No description provided.

@hougesen hougesen self-assigned this May 29, 2024
@hougesen hougesen enabled auto-merge (squash) May 29, 2024 14:08
@hougesen hougesen disabled auto-merge May 29, 2024 14:11
@hougesen hougesen merged commit 28b605c into main May 29, 2024
5 checks passed
@hougesen hougesen deleted the feat/markdown/support-codespell branch May 29, 2024 14:11
@ccoVeille
Copy link
Contributor

ccoVeille commented May 29, 2024

I'm unsure what it's supposed to achieve.

I know codespell very well.

It might suggest multiple solutions to fix a typo. So -w won't fix it. You will have to fix it manually, and it will return an non-zero exist code, which may be interpreted wrongly by your tool

You might have to use -i from 0 to 3, but this parameter is about being interactive.

@hougesen
Copy link
Owner Author

Adding support for spellcheckers seemed like a nobrainer since this tool is focused on documentation already. You are right that it shouldn't autofix in case of wrong suggestions.

@ccoVeille
Copy link
Contributor

Adding support for spellcheckers seemed like a nobrainer since this tool is focused on documentation already. You are right that it shouldn't autofix in case of wrong suggestions.

My point was also about your code should catch the errors code and report the errors or a message.

But I agree it's a great addition

@ccoVeille
Copy link
Contributor

Let's continue the discussion here.

I'm unsure why you rolled back typos fixing with #237 and #236 ?

@hougesen
Copy link
Owner Author

I must have misunderstood what you meant by

It might suggest multiple solutions to fix a typo. So -w won't fix it. You will have to fix it manually, and it will return an non-zero exist code, which may be interpreted wrongly by your tool

hougesen added a commit that referenced this pull request May 31, 2024
hougesen added a commit that referenced this pull request May 31, 2024
hougesen added a commit that referenced this pull request May 31, 2024
hougesen added a commit that referenced this pull request May 31, 2024
hougesen added a commit that referenced this pull request May 31, 2024
hougesen added a commit that referenced this pull request May 31, 2024
hougesen added a commit that referenced this pull request May 31, 2024
hougesen added a commit that referenced this pull request May 31, 2024
@ccoVeille
Copy link
Contributor

My point was that codespell and typos could recommend multiple words for the same typo

Like for "thn", they might suggest

  • the
  • than
  • then

I saw you rolled back, so it's great.

My concern was the fact than when they are alternative that cannot be fixed. typos or codespell will return a non-zero code, so you will receive it as if the tool was in error.

So you might be aware of it and handle these use cases by reporting these warnings.

@hougesen hougesen added the tool Issue or pull request that adds support for new tooling label Jun 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tool Issue or pull request that adds support for new tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants