forked from immutable/contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Slither and Solhint enabled on all future PRs (immutable#172)
This PR resolves all Slither and Solhint issues (but disables them for the recently added PaymentSplitter). It adds the checks to that they will apply for each PR. Documentation is added to provide more information on building new contracts.
- Loading branch information
1 parent
8167edd
commit c3dc859
Showing
66 changed files
with
792 additions
and
864 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Build and Test Information | ||
|
||
## Install | ||
|
||
Install dependencies: | ||
|
||
``` | ||
yarn install | ||
sudo pip3 install slither-analyzer | ||
``` | ||
|
||
## Build and Test | ||
|
||
To build and test the contracts: | ||
|
||
``` | ||
forge test -vvv | ||
yarn test | ||
``` | ||
|
||
## Solidity Linter | ||
|
||
To execute solhint: | ||
|
||
``` | ||
yarn run solhint contracts/**/*.sol | ||
``` | ||
|
||
To resolve formatting issues: | ||
|
||
``` | ||
npx prettier --write --plugin=prettier-plugin-solidity 'contracts/**/*.sol' | ||
``` | ||
|
||
|
||
## Static Code Analysis | ||
|
||
To run slither: | ||
|
||
``` | ||
slither --compile-force-framework forge --foundry-out-directory foundry-out . | ||
``` | ||
|
||
## Test Coverage | ||
|
||
To check the test coverage based on Foundry tests use: | ||
|
||
``` | ||
forge coverage | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.