Skip to content

feat: Add CI for Spell Checking #10637

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

Merged
merged 62 commits into from
Jan 30, 2025
Merged

Conversation

youyyytrok
Copy link
Contributor

@youyyytrok youyyytrok commented Dec 20, 2024

This pull request introduces a Continuous Integration (CI) workflow for detecting spelling mistakes using codespell. The following changes have been implemented:

issue #10633

  • Added a GitHub Actions workflow for spell checking.
  • Fixed all spelling mistakes detected by codespell throughout the repository.

These improvements enhance documentation and code readability while ensuring consistency across the codebase.

@youyyytrok youyyytrok requested review from lidel and a team as code owners December 20, 2024 20:20
@gammazero gammazero added the need/triage Needs initial labeling and prioritization label Dec 21, 2024
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

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

Thank you @youyyytrok!

Before merging this we need to fix sharness tests (details inline)

@@ -882,7 +882,7 @@ test_expect_success "'ipfs add -rn' succeeds" '
mkdir -p mountdir/moons/saturn &&
echo "Hello Europa!" >mountdir/moons/jupiter/europa.txt &&
echo "Hello Titan!" >mountdir/moons/saturn/titan.txt &&
echo "hey youre no moon!" >mountdir/moons/mercury.txt &&
echo "hey you are no moon!" >mountdir/moons/mercury.txt &&
Copy link
Member

@lidel lidel Jan 15, 2025

Choose a reason for hiding this comment

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

@youyyytrok this broke sharness test, do you have bandwidth to update related CIDs in this test file?

expecting success: 
  MOONS="QmVKvomp91nMih5j6hYBA8KjbiaYvEetU2Q7KvtZkLe9nQ" &&
  EUROPA="Qmbjg7zWdqdMaK2BucPncJQDxiALExph5k3NkQv5RHpccu" &&
  JUPITER="QmS5mZddhFPLWFX3w6FzAy9QxyYkaxvUpsWCtZ3r7jub9J" &&
  SATURN="QmaMagZT4rTE7Nonw8KGSK4oe1bh533yhZrCo1HihSG8FK" &&
  TITAN="QmZzppb9WHn552rmRqpPfgU5FEiHH6gDwi3MrB9cTdPwdb" &&
  MERCURY="QmUJjVtnN8YEeYcS8VmUeWffTWhnMQAkk5DzZdKnPhqUdK" &&
  echo "added $EUROPA moons/jupiter/europa.txt" >expected &&
  echo "added $MERCURY moons/mercury.txt" >>expected &&
  echo "added $TITAN moons/saturn/titan.txt" >>expected &&
  echo "added $JUPITER moons/jupiter" >>expected &&
  echo "added $SATURN moons/saturn" >>expected &&
  echo "added $MOONS moons" >>expected &&
  test_cmp expected actual

> diff -u expected actual
--- expected	2025-01-15 01:18:02.736999971 +0000
+++ actual	2025-01-15 01:18:02.664999611 +0000
@@ -1,6 +1,6 @@
 added Qmbjg7zWdqdMaK2BucPncJQDxiALExph5k3NkQv5RHpccu moons/jupiter/europa.txt
-added QmUJjVtnN8YEeYcS8VmUeWffTWhnMQAkk5DzZdKnPhqUdK moons/mercury.txt
+added QmRsTB5CpEUvDUpDgHCzb3VftZ139zrk9zs5ZcgYh9TMPJ moons/mercury.txt
 added QmZzppb9WHn552rmRqpPfgU5FEiHH6gDwi3MrB9cTdPwdb moons/saturn/titan.txt
 added QmS5mZddhFPLWFX3w6FzAy9QxyYkaxvUpsWCtZ3r7jub9J moons/jupiter
 added QmaMagZT4rTE7Nonw8KGSK4oe1bh533yhZrCo1HihSG8FK moons/saturn
-added QmVKvomp91nMih5j6hYBA8KjbiaYvEetU2Q7KvtZkLe9nQ moons
+added QmbGoaQZm8kjYfCiN1aBsgwhqfUBGDYTrDb91Mz7Dvq81B moons

If not, let us know, we can get to it next week.

@youyyytrok
Copy link
Contributor Author

Hi @lidel ! Done!

@youyyytrok youyyytrok requested a review from lidel January 15, 2025 12:21
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

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

Thanks! Let's merge and see how it goes.
We can always remove it if it causes CI failures more often than catching typos.

Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

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

Lol I spoke too soon 😅 – see comment below

Comment on lines 13 to 14
- name: Install Codespell
run: pip install codespell
Copy link
Member

Choose a reason for hiding this comment

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

@youyyytrok re-running the same CI job started failing:
https://github.com/ipfs/kubo/actions/runs/12788199550/job/36008198868#step:4:10

I think this is due to codespell version not being pinned – any way we can control this so it does not break CI every time codespell updates rules?

@youyyytrok
Copy link
Contributor Author

@lidel Hi! Check it🐳

@youyyytrok youyyytrok requested a review from lidel January 25, 2025 14:58
@guillaumemichel
Copy link
Contributor

Triage notes:

@youyyytrok
Copy link
Contributor Author

Hi @guillaumemichel ! Done

@guillaumemichel
Copy link
Contributor

It seems that ignoring ./doc/AUTHORS didn't work. See here. @youyyytrok could you find out why?

@youyyytrok
Copy link
Contributor Author

@guillaumemichel check it👀

@guillaumemichel guillaumemichel merged commit 9adab29 into ipfs:master Jan 30, 2025
17 checks passed
@youyyytrok youyyytrok deleted the ci-spell branch February 5, 2025 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/triage Needs initial labeling and prioritization
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants