You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-7Lines changed: 9 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -115,12 +115,14 @@ This file has the following format:
115
115
The `solhint:default` configuration contains only two rules: max-line-length & no-console
116
116
It is now deprecated since version 5.1.0
117
117
<br>
118
+
118
119
### Note 2
119
120
Multiple configs files can be used at once. All config files should be named `.solhint.json`.
121
+
If not done like this, multiple hierarchy configuration will not work.
120
122
Solhint will go though all config files automatically.
121
123
122
124
Given this structure:
123
-
125
+
```
124
126
Project ROOT =>
125
127
/contracts
126
128
---> RootAndContractRules.sol
@@ -133,13 +135,13 @@ Project ROOT =>
133
135
------->solhint.json
134
136
135
137
.solhint.json
136
-
138
+
```
137
139
- Solhint config located on `root` will be the main one.
138
-
- When analyzing `RooRules.sol`will be using that file.
139
-
-`InterfaceRules.sol` will be using the one inside its folder taking precedence over the `root` folder one
140
-
- Rules not present in `interfaces/` folder and present in `root` will be active
141
-
- Rules not present in `root` folder and present in `interfaces/` folder will be active
142
-
- If rule is present in both files, the closest to the analyzed file will take precedence
140
+
- When analyzing `RootRules.sol`, `root` file config will be used that file.
141
+
-`InterfaceRules.sol` will be using the one inside its own folder taking precedence over the `root` folder one.
142
+
- Rules not present in `interfaces/` folder and present in `root` will be active.
143
+
- Rules not present in `root` folder and present in `interfaces/` folder will be active.
144
+
- If rule is present in both files, the closest to the analyzed file will take precedence. Meaning when analyzing `InterfaceRules.sol` the config file located in `Interfaces/` will be used with the remaining rules of the `root` one.
0 commit comments