Skip to content

Commit

Permalink
Fix lint issues (#235)
Browse files Browse the repository at this point in the history
* ci: disable and fix lint issues

* chore: update node action

* chore: update max warnings

* ci: disable slither unwanted warnings

* Revert "ci: disable slither unwanted warnings"

This reverts commit 73e7807.

* chore: update Dockerfile

* fix: individual import of contracts
  • Loading branch information
blockgroot authored Jun 10, 2024
1 parent 84f1127 commit 723fb35
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
with:
token: ${{ secrets.github_token }}
- name: Set up nodejs
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: 18
- name: install dependencies (npm)
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ RUN yamlfmt -lint .github/workflows/*.yml
RUN forge install
RUN npm run prettier:check
# RUN slither .
# RUN npm run lint
RUN npm run lint
RUN forge test -v
RUN forge geiger --check contracts/*.sol contracts/*/*.sol
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"test": "forge test -v",
"prettier:check": "prettier --check \"(contracts|test|script)/**/*.sol\"",
"prettier:fix": "prettier --write \"(contracts|test|script)/**/*.sol\"",
"lint": "solhint -w 3 'contracts/**/*.sol' 'test/**/*.sol' 'script/**/*.sol'",
"lint": "solhint 'contracts/**/*.sol' 'test/**/*.sol' 'script/**/*.sol'",
"upgrade:arbitrum": "npx hardhat run scripts/safe-scripts/upgrade.ts --network arbitrum",
"upgrade:playground:arbitrum": "npx hardhat run scripts/safe-scripts/upgradePlayground.ts --network arbitrum"
},
Expand Down
2 changes: 1 addition & 1 deletion test/foundry_tests/NodeELRewardVault.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
pragma solidity 0.8.16;

import { Test } from "forge-std/Test.sol";
// solhint-disable no-console
import { console2 } from "forge-std/console2.sol";

import { TransparentUpgradeableProxy } from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
import { ProxyAdmin } from "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol";

Expand Down
2 changes: 1 addition & 1 deletion test/foundry_tests/PermissionedPool.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ contract PermissionedPoolTest is Test {
address externalEOA = vm.addr(1000);
startHoax(externalEOA);
vm.expectRevert(IStaderPoolBase.UnsupportedOperation.selector);
payable(permissionedPool).call{ value: 1 ether }('abi.encodeWithSignature("nonExistentFunction()")');
payable(permissionedPool).call{ value: 1 ether }(abi.encodeWithSignature("nonExistentFunction()"));
vm.stopPrank();
}

Expand Down
2 changes: 1 addition & 1 deletion test/foundry_tests/PermissionlessPool.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ contract PermissionlessPoolTest is Test {
address externalEOA = vm.addr(1000);
startHoax(externalEOA);
vm.expectRevert(IStaderPoolBase.UnsupportedOperation.selector);
payable(permissionlessPool).call{ value: 1 ether }('abi.encodeWithSignature("nonExistentFunction()")');
payable(permissionlessPool).call{ value: 1 ether }(abi.encodeWithSignature("nonExistentFunction()"));
vm.stopPrank();
}

Expand Down
1 change: 1 addition & 0 deletions test/foundry_tests/SDIncentiveController.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import "forge-std/Test.sol";
import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol";

// solhint-disable no-console
contract SDIncentiveControllerTest is Test {
event EmissionRateUpdated(uint256 newEmissionRate);
event RewardEndBlockUpdated(uint256 newRewardEndBlock);
Expand Down
2 changes: 1 addition & 1 deletion test/foundry_tests/StaderStakePoolManager.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ contract StaderStakePoolManagerTest is Test {
address externalEOA = vm.addr(1000);
startHoax(externalEOA);
vm.expectRevert(IStaderStakePoolManager.UnsupportedOperation.selector);
payable(stakePoolManager).call{ value: 1 ether }('abi.encodeWithSignature("nonExistentFunction()")');
payable(stakePoolManager).call{ value: 1 ether }(abi.encodeWithSignature("nonExistentFunction()"));
vm.stopPrank();
}

Expand Down
1 change: 0 additions & 1 deletion test/foundry_tests/ValidatorWithdrawalVault.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
pragma solidity 0.8.16;

import { Test } from "forge-std/Test.sol";
import { console2 } from "forge-std/console2.sol";

import { TransparentUpgradeableProxy } from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
import { ProxyAdmin } from "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol";
Expand Down

0 comments on commit 723fb35

Please sign in to comment.