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: docs/rules/gas-consumption/gas-increment-by-one.md
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,6 @@ This rule accepts a string option for rule severity. Must be one of "error", "wa
24
24
```
25
25
26
26
### Notes
27
-
- This rule only works for expressions like this: [ j = j + 1 ] but will fail if the code is written like this: [ j = 1 + j ]
28
27
-[source 1](https://coinsbench.com/comprehensive-guide-tips-and-tricks-for-gas-optimization-in-solidity-5380db734404) of the rule initiative (Incrementing/Decrementing By 1)
29
28
-[source 2](https://www.rareskills.io/post/gas-optimization?postId=c9db474a-ff97-4fa3-a51d-fe13ccb8fe3b#viewer-8rekj) of the rule initiative
Copy file name to clipboardExpand all lines: lib/rules/gas-consumption/gas-increment-by-one.js
+34-68Lines changed: 34 additions & 68 deletions
Original file line number
Diff line number
Diff line change
@@ -9,9 +9,6 @@ const meta = {
9
9
description: 'Suggest increments by one, like this ++i instead of other type',
10
10
category: 'Gas Consumption Rules',
11
11
notes: [
12
-
{
13
-
note: 'This rule only works for expressions like this: [ j = j + 1 ] but will fail if the code is written like this: [ j = 1 + j ]',
14
-
},
15
12
{
16
13
note: '[source 1](https://coinsbench.com/comprehensive-guide-tips-and-tricks-for-gas-optimization-in-solidity-5380db734404) of the rule initiative (Incrementing/Decrementing By 1)',
17
14
},
@@ -57,25 +54,43 @@ class GasIncrementByOne extends BaseChecker {
0 commit comments