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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use crate.io/typos to repalce CodeSpell for CI typo check #5040

Open
bodhi-crypo opened this issue May 14, 2024 · 0 comments
Open

Use crate.io/typos to repalce CodeSpell for CI typo check #5040

bodhi-crypo opened this issue May 14, 2024 · 0 comments

Comments

@bodhi-crypo
Copy link
Contributor

馃 Motivation

currently openzeppelin-contracts already integrate codespell typo checker,But https://github.com/crate-ci/typos works better

below is crate-ci/typos result:

error: `Transfered` should be `Transferred`
  --> ./certora/specs/ERC20FlashMint.spec:21:62
   |
21 | ghost mapping(address => mapping(address => mathint)) trackedTransferedAmount;
   |                                                              ^^^^^^^^^^
   |
error: `Transfered` should be `Transferred`
  --> ./certora/specs/ERC20FlashMint.spec:31:16
   |
31 |         trackedTransferedAmount[from][to] = amount;
   |                ^^^^^^^^^^
   |
error: `Transfered` should be `Transferred`
  --> ./certora/specs/ERC20FlashMint.spec:54:51
   |
54 |     assert (fees > 0 && recipient != 0) => trackedTransferedAmount[receiver][recipient] == to_mathint(fees);
   |                                                   ^^^^^^^^^^
   |
error: `leafs` should be `leaves`
  --> ./contracts/utils/cryptography/MerkleProof.sol:49:11
   |
49 |      * of leafs & pre-images are assumed to be sorted.
   |           ^^^^^
   |
error: `recomment` should be `recommend`
  --> ./audits/2017-03.md:162:160
    |
162 | I have a general concern about the difference between `owners`, `_owners`, and `owner` in `Ownable.sol`. I recommend "Owners" be renamed. In general we do not recomment single character differences in variable names, although a preceding underscore is not uncommon in Solidity code.
    |                                                                                                                                                                ^^^^^^^^^
    |
error: `quroum` should be `quorum`
  --> ./test/governance/extensions/GovernorVotesQuorumFraction.test.js:77:11
   |
77 |       it('quroum reached', async function () {
   |           ^^^^^^
   |
error: `quroum` should be `quorum`
  --> ./test/governance/extensions/GovernorVotesQuorumFraction.test.js:85:11
   |
85 |       it('quroum not reached', async function () {
   |           ^^^^^^
   |
error: `leafs` should be `leaves`
  --> ./test/utils/structs/MerkleTree.test.js:9:19
  |
9 | const makeTree = (leafs = [ethers.ZeroHash]) =>
  |                   ^^^^^
  |
error: `leafs` should be `leaves`
  --> ./test/utils/structs/MerkleTree.test.js:11:5
   |
11 |     leafs.map(leaf => [leaf]),
   |     ^^^^^
   |
error: `leafs` should be `leaves`
  --> ./test/utils/structs/MerkleTree.test.js:42:13
   |
42 |       const leafs = Array.from({ length: 2 ** Number(DEPTH) }, () => ethers.ZeroHash);
   |             ^^^^^
   |
error: `leafs` should be `leaves`
  --> ./test/utils/structs/MerkleTree.test.js:45:23
   |
45 |       for (const i in leafs) {
   |                       ^^^^^
   |
error: `leafs` should be `leaves`
  --> ./test/utils/structs/MerkleTree.test.js:47:38
   |
47 |         const hashedLeaf = hashLeaf((leafs[i] = generators.bytes32()));
   |                                      ^^^^^
   |
error: `leafs` should be `leaves`
  --> ./test/utils/structs/MerkleTree.test.js:50:31
   |
50 |         const tree = makeTree(leafs);
   |                               ^^^^^
   |
error: `Leafs` should be `Leaves`
  --> ./test/utils/structs/MerkleTree.test.js:70:15
   |
70 |     const zeroLeafs = Array.from({ length: 2 ** Number(DEPTH) }, () => ethers.ZeroHash);
   |               ^^^^^
   |
error: `Leafs` should be `Leaves`
  --> ./test/utils/structs/MerkleTree.test.js:71:35
   |
71 |     const zeroTree = makeTree(zeroLeafs);
   |                                   ^^^^^
   |
error: `leafs` should be `leaves`
  --> ./test/utils/structs/MerkleTree.test.js:74:11
   |
74 |     const leafs = Array.from({ length: 2 ** Number(DEPTH) }, () => ethers.ZeroHash);
   |           ^^^^^
   |
error: `leafs` should be `leaves`
  --> ./test/utils/structs/MerkleTree.test.js:75:34
   |
75 |     const hashedLeaf = hashLeaf((leafs[0] = generators.bytes32())); // fill first leaf and hash it
   |                                  ^^^^^
   |
error: `leafs` should be `leaves`
  --> ./test/utils/structs/MerkleTree.test.js:76:27
   |
76 |     const tree = makeTree(leafs);
   |                           ^^^^^
   |

馃摑 Details

suggestion: Use crate.io/typos to repalce CodeSpell for CI typo check

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

No branches or pull requests

1 participant