Skip to content

Commit 82d3207

Browse files
author
dbale-altoros
committed
add readme comment
1 parent 4c3010b commit 82d3207

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,14 @@ This file has the following format:
115115
The `solhint:default` configuration contains only two rules: max-line-length & no-console
116116
It is now deprecated since version 5.1.0
117117
<br>
118+
118119
### Note 2
119120
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.
120122
Solhint will go though all config files automatically.
121123

122124
Given this structure:
123-
125+
```
124126
Project ROOT =>
125127
/contracts
126128
---> RootAndContractRules.sol
@@ -133,13 +135,13 @@ Project ROOT =>
133135
------->solhint.json
134136
135137
.solhint.json
136-
138+
```
137139
- 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.
143145
<br><br>
144146

145147

0 commit comments

Comments
 (0)