Skip to content

Commit

Permalink
setup solhint + update forge fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Raunak Singh authored and Raunak Singh committed Mar 1, 2024
1 parent 6131f7d commit fdb9308
Show file tree
Hide file tree
Showing 4 changed files with 759 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .solhint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"extends": "solhint:all",
"rules":{
"compiler-version": ["error", "^0.8.0"],
"const-name-snakecase": "error",
"constructor-syntax": "error",
"no-global-import" : ["error"],
"custom-errors": ["error"],
"no-inline-assembly": ["ignore"],
"named-return-values": ["error"],
"private-vars-leading-underscore": ["error"],
"ordering": ["error"],
"func-visibility": [
"error",
{
"ignoreConstructors": true
}

],
"max-line-length": ["error", 160]
}

}
5 changes: 4 additions & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
[profile.default]
solc-version = '0.8.15'
auto_detect_solc = true
src = 'contracts'
out = 'out'
libs = ['lib']
test = 'test'
cache_path = 'forge-cache'
gas_reports = ['*']
fs_permissions = [{ access = 'read', path = './test/payload'}]
[fmt]
wrap_comments = true
number_underscore = "thousands"

# See more config options https://book.getfoundry.sh/reference/config.html
13 changes: 13 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "vibc-core-smart-contracts",
"version": "1.0.0",
"main": "index.js",
"repository": "https://github.com/open-ibc/vibc-core-smart-contracts",
"license": "MIT",
"dependencies": {
"solhint": "^4.1.1"
},
"scripts": {
"lint": "solhint contracts/**/*.sol"
}
}
Loading

0 comments on commit fdb9308

Please sign in to comment.