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/variable-scope/0.4.25/predeclaration_usage_local....

1339 lines
65 KiB

[
[
{
"elements": [
{
"type": "variable",
"name": "x",
"source_mapping": {
"start": 130,
"length": 10,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
5
],
"starting_column": 9,
"ending_column": 19
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "f",
"source_mapping": {
"start": 17,
"length": 442,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "C",
"source_mapping": {
"start": 0,
"length": 461,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19
],
"starting_column": 1,
"ending_column": 0
}
},
"signature": "f(uint256)"
}
}
}
},
{
"type": "function",
"name": "f",
"source_mapping": {
"start": 17,
"length": 442,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "C",
"source_mapping": {
"start": 0,
"length": 461,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19
],
"starting_column": 1,
"ending_column": 0
}
},
"signature": "f(uint256)"
}
},
{
"type": "node",
"name": "y = x + 9 + z",
"source_mapping": {
"start": 69,
"length": 13,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
4
],
"starting_column": 9,
"ending_column": 22
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "f",
"source_mapping": {
"start": 17,
"length": 442,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "C",
"source_mapping": {
"start": 0,
"length": 461,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19
],
"starting_column": 1,
"ending_column": 0
}
},
"signature": "f(uint256)"
}
}
}
}
],
"description": "Variable 'C.f(uint256).x (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#5)' in C.f(uint256) (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#2-17) potentially used before declaration: y = x + 9 + z (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#4)\n",
"markdown": "Variable '[C.f(uint256).x](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L5)' in [C.f(uint256)](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L2-L17) potentially used before declaration: [y = x + 9 + z](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L4)\n",
"first_markdown_element": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L5",
"id": "ede1e902fdfe70c5e7cf91f33df8540f1d15952d00f70a9a5dfb9edbcbe49cb6",
"check": "variable-scope",
"impact": "Low",
"confidence": "High"
},
{
"elements": [
{
"type": "variable",
"name": "i",
"source_mapping": {
"start": 199,
"length": 11,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
8
],
"starting_column": 18,
"ending_column": 29
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "f",
"source_mapping": {
"start": 17,
"length": 442,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "C",
"source_mapping": {
"start": 0,
"length": 461,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19
],
"starting_column": 1,
"ending_column": 0
}
},
"signature": "f(uint256)"
}
}
}
},
{
"type": "function",
"name": "f",
"source_mapping": {
"start": 17,
"length": 442,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "C",
"source_mapping": {
"start": 0,
"length": 461,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19
],
"starting_column": 1,
"ending_column": 0
}
},
"signature": "f(uint256)"
}
},
{
"type": "node",
"name": "i = 10",
"source_mapping": {
"start": 402,
"length": 6,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
14
],
"starting_column": 14,
"ending_column": 20
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "f",
"source_mapping": {
"start": 17,
"length": 442,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "C",
"source_mapping": {
"start": 0,
"length": 461,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19
],
"starting_column": 1,
"ending_column": 0
}
},
"signature": "f(uint256)"
}
}
}
}
],
"description": "Variable 'C.f(uint256).i (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#8)' in C.f(uint256) (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#2-17) potentially used before declaration: i = 10 (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#14)\n",
"markdown": "Variable '[C.f(uint256).i](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L8)' in [C.f(uint256)](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L2-L17) potentially used before declaration: [i = 10](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L14)\n",
"first_markdown_element": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L8",
"id": "940660958df422ffbfe30b13d535439b2cb3f84146a23034087228c4e9016d75",
"check": "variable-scope",
"impact": "Low",
"confidence": "High"
},
{
"elements": [
{
"type": "variable",
"name": "i",
"source_mapping": {
"start": 199,
"length": 11,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
8
],
"starting_column": 18,
"ending_column": 29
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "f",
"source_mapping": {
"start": 17,
"length": 442,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "C",
"source_mapping": {
"start": 0,
"length": 461,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19
],
"starting_column": 1,
"ending_column": 0
}
},
"signature": "f(uint256)"
}
}
}
},
{
"type": "function",
"name": "f",
"source_mapping": {
"start": 17,
"length": 442,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "C",
"source_mapping": {
"start": 0,
"length": 461,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19
],
"starting_column": 1,
"ending_column": 0
}
},
"signature": "f(uint256)"
}
},
{
"type": "node",
"name": "i > 0",
"source_mapping": {
"start": 410,
"length": 5,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
14
],
"starting_column": 22,
"ending_column": 27
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "f",
"source_mapping": {
"start": 17,
"length": 442,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "C",
"source_mapping": {
"start": 0,
"length": 461,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19
],
"starting_column": 1,
"ending_column": 0
}
},
"signature": "f(uint256)"
}
}
}
}
],
"description": "Variable 'C.f(uint256).i (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#8)' in C.f(uint256) (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#2-17) potentially used before declaration: i > 0 (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#14)\n",
"markdown": "Variable '[C.f(uint256).i](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L8)' in [C.f(uint256)](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L2-L17) potentially used before declaration: [i > 0](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L14)\n",
"first_markdown_element": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L8",
"id": "ffb778e86e0b11beed38687c3abf9ffd0de948ec4ccc0109a78954741220de9e",
"check": "variable-scope",
"impact": "Low",
"confidence": "High"
},
{
"elements": [
{
"type": "variable",
"name": "i",
"source_mapping": {
"start": 199,
"length": 11,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
8
],
"starting_column": 18,
"ending_column": 29
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "f",
"source_mapping": {
"start": 17,
"length": 442,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "C",
"source_mapping": {
"start": 0,
"length": 461,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19
],
"starting_column": 1,
"ending_column": 0
}
},
"signature": "f(uint256)"
}
}
}
},
{
"type": "function",
"name": "f",
"source_mapping": {
"start": 17,
"length": 442,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "C",
"source_mapping": {
"start": 0,
"length": 461,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19
],
"starting_column": 1,
"ending_column": 0
}
},
"signature": "f(uint256)"
}
},
{
"type": "node",
"name": "x += i",
"source_mapping": {
"start": 436,
"length": 6,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
15
],
"starting_column": 13,
"ending_column": 19
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "f",
"source_mapping": {
"start": 17,
"length": 442,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "C",
"source_mapping": {
"start": 0,
"length": 461,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19
],
"starting_column": 1,
"ending_column": 0
}
},
"signature": "f(uint256)"
}
}
}
}
],
"description": "Variable 'C.f(uint256).i (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#8)' in C.f(uint256) (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#2-17) potentially used before declaration: x += i (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#15)\n",
"markdown": "Variable '[C.f(uint256).i](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L8)' in [C.f(uint256)](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L2-L17) potentially used before declaration: [x += i](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L15)\n",
"first_markdown_element": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L8",
"id": "e346a217ae6931f9fa7ff70302d05db17c0422dd4272f87935b633950239b592",
"check": "variable-scope",
"impact": "Low",
"confidence": "High"
},
{
"elements": [
{
"type": "variable",
"name": "i",
"source_mapping": {
"start": 199,
"length": 11,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
8
],
"starting_column": 18,
"ending_column": 29
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "f",
"source_mapping": {
"start": 17,
"length": 442,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "C",
"source_mapping": {
"start": 0,
"length": 461,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19
],
"starting_column": 1,
"ending_column": 0
}
},
"signature": "f(uint256)"
}
}
}
},
{
"type": "function",
"name": "f",
"source_mapping": {
"start": 17,
"length": 442,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "C",
"source_mapping": {
"start": 0,
"length": 461,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19
],
"starting_column": 1,
"ending_column": 0
}
},
"signature": "f(uint256)"
}
},
{
"type": "node",
"name": "i --",
"source_mapping": {
"start": 417,
"length": 3,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
14
],
"starting_column": 29,
"ending_column": 32
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "f",
"source_mapping": {
"start": 17,
"length": 442,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "C",
"source_mapping": {
"start": 0,
"length": 461,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol",
"is_dependency": false,
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19
],
"starting_column": 1,
"ending_column": 0
}
},
"signature": "f(uint256)"
}
}
}
}
],
"description": "Variable 'C.f(uint256).i (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#8)' in C.f(uint256) (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#2-17) potentially used before declaration: i -- (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#14)\n",
"markdown": "Variable '[C.f(uint256).i](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L8)' in [C.f(uint256)](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L2-L17) potentially used before declaration: [i --](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L14)\n",
"first_markdown_element": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L8",
"id": "24ed055a29ee9bac066b9a99a36d40f7bd77314605d8f1a6440a5576a38b24fb",
"check": "variable-scope",
"impact": "Low",
"confidence": "High"
}
]
]