Skip to content

Commit 8489be6

Browse files
committed
add option for surya.negModifiers - surya#162
1 parent 684aba7 commit 8489be6

File tree

3 files changed

+25
-2
lines changed

3 files changed

+25
-2
lines changed

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,24 @@
22

33
Note: Don't forget to check out `preferences → Settings → Solidity Visual Developer` to customize features, look and feel.
44

5+
## v0.1.2
6+
7+
- new: decorations for immutables - #97 (thanks @RomiRand)
8+
- update: dependencies ([email protected])
9+
- new: configuration option to enable the `surya.mdreport` "negative Modifiers" feature, see [surya#162](https://github.com/ConsenSys/surya/pull/162)
10+
- enabling `solidity-va.tools.surya.option.negModifiers` will list all modifiers observed in the file with the ones that are not being used with the listed method being ~~striked-through~~
11+
12+
![image](https://user-images.githubusercontent.com/2998191/155733325-7a6187b8-e63e-4410-a312-aa2a1c940e31.png)
13+
14+
Note that the report can be generated either via the `report` codelense or by selecting files in the `Solidity Visual Developer View → right-click → Surya: generate report`.
15+
16+
<img width="401" alt="image" src="https://user-images.githubusercontent.com/2865694/163411802-49e91a8d-df9e-44ca-8c62-23510d7c9a4a.png">
17+
18+
<img width="398" alt="image" src="https://user-images.githubusercontent.com/2865694/163412288-20e621df-b715-4074-b8f8-033a4b758002.png">
19+
20+
21+
- fix: typos & links to placeholder[.]com - #93 #91 (thanks @almndbtr)
22+
523
## v0.1.1 - ❄️🎄🏂🎄❄️
624

725
- fix: type resolving and declaration link for inherited statevars

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,11 @@
368368
"default": "cached",
369369
"description": "Define whether surya should take cached files or all contracts in the workspace as input"
370370
},
371+
"solidity-va.tools.surya.option.negModifiers": {
372+
"type": "boolean",
373+
"default": false,
374+
"description": "Surya.mdreport: Also list modifiers that are not present ( ~~strikedthrough~~). This may help catch issues relating to missing modifiers."
375+
},
371376
"solidity-va.preview.dot": {
372377
"type": "boolean",
373378
"default": true,
@@ -517,6 +522,6 @@
517522
"c3-linearization": "^0.3.0",
518523
"keccak": "^3.0.2",
519524
"solidity-workspace": "^0.1.5",
520-
"surya": "^0.4.6-dev.3"
525+
"surya": "^0.4.6"
521526
}
522527
}

src/features/commands.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ class Commands{
297297

298298
break;
299299
case "mdreport":
300-
ret = surya.mdreport(files);
300+
ret = surya.mdreport(files, {negModifiers: settings.extensionConfig().tools.surya.option.negModifiers});
301301
if(!ret) {
302302
return;
303303
}

0 commit comments

Comments
 (0)