Static Analyzer for Solidity
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
slither/tests/detectors/costly-loop/multiple_costly_operations_...

184 lines
8.8 KiB

[
[
{
"elements": [
{
"type": "function",
"name": "bad",
"source_mapping": {
"start": 252,
"length": 373,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/costly-loop/multiple_costly_operations_in_loop.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/costly-loop/multiple_costly_operations_in_loop.sol",
"is_dependency": false,
"lines": [
10,
11,
12,
13,
14
],
"starting_column": 3,
"ending_column": 4
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "CostlyOperationsInLoop",
"source_mapping": {
"start": 26,
"length": 1081,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/costly-loop/multiple_costly_operations_in_loop.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/costly-loop/multiple_costly_operations_in_loop.sol",
"is_dependency": false,
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad()"
}
},
{
"type": "node",
"name": "state_variable ++",
"source_mapping": {
"start": 410,
"length": 16,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/costly-loop/multiple_costly_operations_in_loop.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/costly-loop/multiple_costly_operations_in_loop.sol",
"is_dependency": false,
"lines": [
12
],
"starting_column": 7,
"ending_column": 23
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "bad",
"source_mapping": {
"start": 252,
"length": 373,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/costly-loop/multiple_costly_operations_in_loop.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/costly-loop/multiple_costly_operations_in_loop.sol",
"is_dependency": false,
"lines": [
10,
11,
12,
13,
14
],
"starting_column": 3,
"ending_column": 4
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "CostlyOperationsInLoop",
"source_mapping": {
"start": 26,
"length": 1081,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/costly-loop/multiple_costly_operations_in_loop.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/costly-loop/multiple_costly_operations_in_loop.sol",
"is_dependency": false,
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad()"
}
}
}
}
],
"description": "CostlyOperationsInLoop.bad() (tests/detectors/costly-loop/multiple_costly_operations_in_loop.sol#10-14) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/multiple_costly_operations_in_loop.sol#12)\n",
"markdown": "[CostlyOperationsInLoop.bad()](tests/detectors/costly-loop/multiple_costly_operations_in_loop.sol#L10-L14) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/multiple_costly_operations_in_loop.sol#L12)\n",
"id": "245dbe07302f785326efd84e8b711d1691f045726e1098601f7e1058f1e72b2a",
"check": "costly-loop",
"impact": "Informational",
"confidence": "Medium"
}
]
]