Skip to content

Commit

Permalink
fix(ci): linting errors from updated ws
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbeckers committed Oct 17, 2023
1 parent 6f9485e commit a6dd6a2
Show file tree
Hide file tree
Showing 16 changed files with 47 additions and 31 deletions.
13 changes: 12 additions & 1 deletion contracts/.prettierrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,21 @@ tabWidth: 2
trailingComma: "all"
useTabs: false

plugins:
- prettier-plugin-solidity

overrides:
- files: "**/*.t.sol"
rules:
max-state-count": "off"
state-visibility": "off"
max-line-length": "off"
options:
tabWidth: 4
- files: "*.sol"
rules:
compiler-version: "0.8.16"
options:
compiler: "0.8.16"
tabWidth: 4
- files: "*.ts"
options:
Expand Down
4 changes: 3 additions & 1 deletion contracts/.solhint.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"plugins": ["prettier"],
"extends": "solhint:recommended",
"rules": {
"code-complexity": ["error", 8],
Expand All @@ -7,6 +8,7 @@
"max-line-length": ["error", 120],
"no-console": "off",
"not-rely-on-time": "off",
"reason-string": ["warn", { "maxLength": 64 }]
"reason-string": ["warn", { "maxLength": 64 }],
"one-contract-per-file": "off"
}
}
5 changes: 3 additions & 2 deletions contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"hardhat-preprocessor": "^0.1.5",
"husky": "^8.0.1",
"lint-staged": "^13.0.3",
"prettier": "^2.7.1",
"prettier": "^2.8.8",
"prettier-plugin-solidity": "^1.1.3",
"rimraf": "^5.0.5",
"rollup": "^4.0.2",
Expand All @@ -70,7 +70,8 @@
"rollup-plugin-esbuild": "^6.1.0",
"rollup-plugin-node-polyfills": "^0.2.1",
"shx": "^0.3.4",
"solhint": "^3.3.7",
"solhint": "^3.6.2",
"solhint-plugin-prettier": "^0.0.5",
"solidity-coverage": "^0.8.2",
"ts-node": "^10.9.1",
"typechain": "^8.3.1",
Expand Down
7 changes: 0 additions & 7 deletions contracts/test/foundry/AllowlistMinter.t.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.16;

import { console2 } from "forge-std/console2.sol";
import { PRBTest } from "prb-test/PRBTest.sol";
import { StdCheats } from "forge-std/StdCheats.sol";
import { StdUtils } from "forge-std/StdUtils.sol";
Expand Down Expand Up @@ -75,9 +74,6 @@ contract AllowlistTest is PRBTest, StdCheats, StdUtils {
units[2] = 600;

bytes32[] memory data = merkle.generateCustomData(accounts, units);
for (uint256 i = 0; i < data.length; i++) {
console2.logBytes32(data[i]);
}

bytes32 root = merkle.getRoot(data);

Expand All @@ -102,9 +98,6 @@ contract AllowlistTest is PRBTest, StdCheats, StdUtils {
units[2] = 600;

bytes32[] memory data = merkle.generateCustomData(accounts, units);
for (uint256 i = 0; i < data.length; i++) {
console2.logBytes32(data[i]);
}

bytes32 root = merkle.getRoot(data);

Expand Down
2 changes: 0 additions & 2 deletions contracts/test/foundry/Bitshifting.t.sol
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.16;

import { console2 } from "forge-std/console2.sol";
import { PRBTest } from "prb-test/PRBTest.sol";
import { StdCheats } from "forge-std/StdCheats.sol";
import { StdUtils } from "forge-std/StdUtils.sol";
import { SemiFungible1155Helper } from "./SemiFungibleHelper.sol";

contract Bitshifter {
/// @dev Bitmask used to expose only upper 128 bits of uint256
Expand Down
6 changes: 2 additions & 4 deletions contracts/test/foundry/HypercertMinter.batchminting.t.sol
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.16;

import { console2 } from "forge-std/console2.sol";
import { PRBTest } from "prb-test/PRBTest.sol";
import { StdCheats } from "forge-std/StdCheats.sol";
import { StdUtils } from "forge-std/StdUtils.sol";
import { HypercertMinter } from "../../src/HypercertMinter.sol";
import {
ERC1155HolderUpgradeable
} from "lib/openzeppelin-contracts-upgradeable/contracts/token/ERC1155/utils/ERC1155HolderUpgradeable.sol";
//solhint-disable-next-line max-line-length
import { ERC1155HolderUpgradeable } from "openzeppelin-contracts-upgradeable/contracts/token/ERC1155/utils/ERC1155HolderUpgradeable.sol";
import { Merkle } from "murky/Merkle.sol";
import { IHypercertToken } from "../../src/interfaces/IHypercertToken.sol";

Expand Down
1 change: 0 additions & 1 deletion contracts/test/foundry/HypercertMinter.pausable.t.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.16;

import { console2 } from "forge-std/console2.sol";
import { StdCheats } from "forge-std/StdCheats.sol";
import { StdUtils } from "forge-std/StdUtils.sol";
import { PRBTest } from "prb-test/PRBTest.sol";
Expand Down
1 change: 0 additions & 1 deletion contracts/test/foundry/HypercertMinter.transfers.t.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.16;

import { console2 } from "forge-std/console2.sol";
import { StdCheats } from "forge-std/StdCheats.sol";
import { StdUtils } from "forge-std/StdUtils.sol";
import { PRBTest } from "prb-test/PRBTest.sol";
Expand Down
7 changes: 4 additions & 3 deletions contracts/test/foundry/PerformanceTesting.t.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.16;

import { console2 } from "forge-std/console2.sol";
import { PRBTest } from "prb-test/PRBTest.sol";
import { StdCheats } from "forge-std/StdCheats.sol";
import { StdUtils } from "forge-std/StdUtils.sol";
Expand Down Expand Up @@ -46,7 +45,9 @@ contract PerformanceTestHelper is Merkle {
return 0;
}
sum = 0;
for (uint256 i = 0; i < array.length; i++) sum += array[i];
for (uint256 i = 0; i < array.length; i++) {
sum += array[i];
}
}

function buildFractions(uint256 size) public pure returns (uint256[] memory) {
Expand All @@ -66,8 +67,8 @@ contract PerformanceTestHelper is Merkle {

function isContract(address _addr) internal view returns (bool) {
uint32 size;
// solhint-disable-next-line no-inline-assembly
assembly {
// solhint-disable-next-line no-inline-assembly
size := extcodesize(_addr)
}
return (size > 0);
Expand Down
2 changes: 0 additions & 2 deletions contracts/test/foundry/SemiFungible1155.allowances.t.sol
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.16;

import { console2 } from "forge-std/console2.sol";
import { PRBTest } from "prb-test/PRBTest.sol";
import { stdError } from "forge-std/StdError.sol";
import { StdCheats } from "forge-std/StdCheats.sol";
import { StdUtils } from "forge-std/StdUtils.sol";
import { SemiFungible1155Helper } from "./SemiFungibleHelper.sol";
Expand Down
1 change: 0 additions & 1 deletion contracts/test/foundry/SemiFungible1155.burning.t.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.8.16;

import { console2 } from "forge-std/console2.sol";
import { PRBTest } from "prb-test/PRBTest.sol";
import { StdCheats } from "forge-std/StdCheats.sol";
import { StdUtils } from "forge-std/StdUtils.sol";
Expand Down
1 change: 0 additions & 1 deletion contracts/test/foundry/SemiFungible1155.minting.t.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.16;

import { console2 } from "forge-std/console2.sol";
import { PRBTest } from "prb-test/PRBTest.sol";
import { stdError } from "forge-std/StdError.sol";
import { StdCheats } from "forge-std/StdCheats.sol";
Expand Down
1 change: 0 additions & 1 deletion contracts/test/foundry/SemiFungible1155.t.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.16;

import { console2 } from "forge-std/console2.sol";
import { PRBTest } from "prb-test/PRBTest.sol";
import { StdCheats } from "forge-std/StdCheats.sol";
import { StdUtils } from "forge-std/StdUtils.sol";
Expand Down
1 change: 0 additions & 1 deletion contracts/test/foundry/SemiFungible1155.transfers.t.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.16;

import { console2 } from "forge-std/console2.sol";
import { StdCheats } from "forge-std/StdCheats.sol";
import { StdUtils } from "forge-std/StdUtils.sol";
import { PRBTest } from "prb-test/PRBTest.sol";
Expand Down
1 change: 0 additions & 1 deletion contracts/test/foundry/SemiFungible1155.units.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.16;

import { console2 } from "forge-std/console2.sol";
import { PRBTest } from "prb-test/PRBTest.sol";
import { StdCheats } from "forge-std/StdCheats.sol";
import { StdUtils } from "forge-std/StdUtils.sol";
Expand Down
25 changes: 23 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a6dd6a2

Please sign in to comment.