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

Add typos tool to CI to automate typo detection #76

Merged
merged 3 commits into from
Feb 26, 2024
Merged

Conversation

arnaucube
Copy link
Collaborator

@arnaucube arnaucube commented Feb 25, 2024

Motivation:
Since recently more projects are starting to do airdrops and using lists of repositories to reward contributors (eg. Namada, StarkWare, etc), a new wave of airdrop farmers has emerged, no longer collecting discord chat points but now going after code contributions.
In the era of bots and automation, we must protect humans attention and time, and in this case we can avoid spending time on airdrop-farmers PRs that could simply be avoided by having our own automated tool.

This has been already a problem to other projects, we were postponing it but seems that we are now target too: #75

A quick look at the PR author profile shows some other PRs from the same user executing a typo-finding-tool and opening PRs (listing here only few):
privacy-scaling-explorations/snark-verifier#60
privacy-scaling-explorations/chiquito#210
privacy-scaling-explorations/zk-kit#182
privacy-scaling-explorations/halo2curves#140
privacy-scaling-explorations/p0tion#266
privacy-scaling-explorations/maci#1245
privacy-scaling-explorations/zkevm-circuits#1780
bandada-infra/bandada#409
ethereum/solidity#14815
netdata/netdata#17049
ethereum/c-kzg-4844#397
ethereum/hevm#458
aptos-labs/aptos-ts-sdk#300 (Notice that in this case, the reviewers asked a small change and the PR-farmer decided it was not worth the effort)
aptos-labs/aptos-networks#61
nimiq/core-rs-albatross#2241

There are now even twitter tutorials on how to farm contributions: https://twitter.com/Abrahamchase09/status/1759101213381959960 , which has their results: https://twitter.com/toghrulmaharram/status/1759228275228905511 .

A solution could be from time to time do a PR fixing all typos, as done here: risc0/risc0#1319 , but this does not prevent future typos from happening.

What this PR does:
Add GitHub CI that runs typos so future PRs will run the typos check to detect typos. Also this PR fixes the detected typos.

About the tool:

  • Tried cspell (typescript) , and it has too many false-positives (thousands) for custom variable names that we don't consider them typos (eg. Multilinear, evals, arkworks, thiserror, Circom, biguint, nbits, ... and a thousand more), since it works with a dictionary of correct words approach.
  • Then with typos (rust), since it does not work with a dictionary of correct words but with a dictionary of typos corrections, it does not have the false positives that cspell has. The downside of this approach is that it might not recognize typos that are not yet in their list, but it can easily be updated.

@arnaucube arnaucube changed the title [Do not merge yet, testing] Add typos to CI Add typos to CI Feb 25, 2024
@arnaucube arnaucube changed the title Add typos to CI Add typos tool to CI to automate typo detection Feb 25, 2024
@rex4539
Copy link

rex4539 commented Feb 25, 2024

Hey!

I totally approve of your idea to automate typo detection. I have even personally suggested it to folks in the past.

But you have totally misunderstood my intentions here. Since you have taken the time to go through my recent PR contributions, I would suggest that you go back and check all my PR contributions AND bug reports over the years.

While you will find many typo fixing PRs as it's a low hanging fruit and I'm not a developer but a tech fan and I do it just for fun, you will also find that I have contributed in very diverse projects that have no connection to crypto whatsoever. So if my intention would be to farm PRs why would I waste my effort and contribute to projects I have nothing to gain from? The answer is that I do it only for projects I like for different reasons and it's my way to say thanks to the developers.

But after reading your reasoning, I do see why you would think I am a "PR farmer". By the way, this is the first time I stumble upon this term!

Anyway, no hard feelings and keep doing what you are doing :)

Copy link
Collaborator

@dmpierre dmpierre left a comment

Choose a reason for hiding this comment

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

This is really cool, lgtm!

folding-schemes/src/folding/hypernova/lcccs.rs Outdated Show resolved Hide resolved
Copy link
Member

@CPerezz CPerezz left a comment

Choose a reason for hiding this comment

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

LGTM!

Thanks for addressing this.

@arnaucube arnaucube added this pull request to the merge queue Feb 26, 2024
Merged via the queue into main with commit 9159c5c Feb 26, 2024
4 checks passed
@danimoh danimoh mentioned this pull request Feb 29, 2024
@arnaucube arnaucube deleted the feature/typos branch May 23, 2024 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants