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/redundant-statements/redundant_statements.sol.0....

733 lines
36 KiB

[
[
{
"elements": [
{
"type": "node",
"name": "uint256",
"source_mapping": {
"start": 141,
"length": 4,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/redundant-statements/redundant_statements.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/redundant-statements/redundant_statements.sol",
"is_dependency": false,
"lines": [
6
],
"starting_column": 9,
"ending_column": 13
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "constructor",
"source_mapping": {
"start": 110,
"length": 93,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/redundant-statements/redundant_statements.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/redundant-statements/redundant_statements.sol",
"is_dependency": false,
"lines": [
5,
6,
7,
8,
9
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "RedundantStatementsContract",
"source_mapping": {
"start": 66,
"length": 254,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/redundant-statements/redundant_statements.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/redundant-statements/redundant_statements.sol",
"is_dependency": false,
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18
],
"starting_column": 1,
"ending_column": 0
}
},
"signature": "constructor()"
}
}
}
},
{
"type": "contract",
"name": "RedundantStatementsContract",
"source_mapping": {
"start": 66,
"length": 254,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/redundant-statements/redundant_statements.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/redundant-statements/redundant_statements.sol",
"is_dependency": false,
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18
],
"starting_column": 1,
"ending_column": 0
}
}
],
"description": "Redundant expression \"uint256 (tests/detectors/redundant-statements/redundant_statements.sol#6)\" inRedundantStatementsContract (tests/detectors/redundant-statements/redundant_statements.sol#3-18)\n",
"markdown": "Redundant expression \"[uint256](tests/detectors/redundant-statements/redundant_statements.sol#L6)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/redundant_statements.sol#L3-L18)\n",
"id": "cff54481eae76053f9cae0d4f77a2e5092461dc3fcb9e4e2f8605afb6aa832aa",
"check": "redundant-statements",
"impact": "Informational",
"confidence": "High"
},
{
"elements": [
{
"type": "node",
"name": "bool",
"source_mapping": {
"start": 155,
"length": 4,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/redundant-statements/redundant_statements.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/redundant-statements/redundant_statements.sol",
"is_dependency": false,
"lines": [
7
],
"starting_column": 9,
"ending_column": 13
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "constructor",
"source_mapping": {
"start": 110,
"length": 93,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/redundant-statements/redundant_statements.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/redundant-statements/redundant_statements.sol",
"is_dependency": false,
"lines": [
5,
6,
7,
8,
9
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "RedundantStatementsContract",
"source_mapping": {
"start": 66,
"length": 254,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/redundant-statements/redundant_statements.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/redundant-statements/redundant_statements.sol",
"is_dependency": false,
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18
],
"starting_column": 1,
"ending_column": 0
}
},
"signature": "constructor()"
}
}
}
},
{
"type": "contract",
"name": "RedundantStatementsContract",
"source_mapping": {
"start": 66,
"length": 254,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/redundant-statements/redundant_statements.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/redundant-statements/redundant_statements.sol",
"is_dependency": false,
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18
],
"starting_column": 1,
"ending_column": 0
}
}
],
"description": "Redundant expression \"bool (tests/detectors/redundant-statements/redundant_statements.sol#7)\" inRedundantStatementsContract (tests/detectors/redundant-statements/redundant_statements.sol#3-18)\n",
"markdown": "Redundant expression \"[bool](tests/detectors/redundant-statements/redundant_statements.sol#L7)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/redundant_statements.sol#L3-L18)\n",
"id": "bd643774adde96fa093cf2ec70d9a80fc2999dba8b61b60d0df19366003d74d5",
"check": "redundant-statements",
"impact": "Informational",
"confidence": "High"
},
{
"elements": [
{
"type": "node",
"name": "RedundantStatementsContract",
"source_mapping": {
"start": 169,
"length": 27,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/redundant-statements/redundant_statements.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/redundant-statements/redundant_statements.sol",
"is_dependency": false,
"lines": [
8
],
"starting_column": 9,
"ending_column": 36
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "constructor",
"source_mapping": {
"start": 110,
"length": 93,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/redundant-statements/redundant_statements.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/redundant-statements/redundant_statements.sol",
"is_dependency": false,
"lines": [
5,
6,
7,
8,
9
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "RedundantStatementsContract",
"source_mapping": {
"start": 66,
"length": 254,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/redundant-statements/redundant_statements.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/redundant-statements/redundant_statements.sol",
"is_dependency": false,
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18
],
"starting_column": 1,
"ending_column": 0
}
},
"signature": "constructor()"
}
}
}
},
{
"type": "contract",
"name": "RedundantStatementsContract",
"source_mapping": {
"start": 66,
"length": 254,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/redundant-statements/redundant_statements.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/redundant-statements/redundant_statements.sol",
"is_dependency": false,
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18
],
"starting_column": 1,
"ending_column": 0
}
}
],
"description": "Redundant expression \"RedundantStatementsContract (tests/detectors/redundant-statements/redundant_statements.sol#8)\" inRedundantStatementsContract (tests/detectors/redundant-statements/redundant_statements.sol#3-18)\n",
"markdown": "Redundant expression \"[RedundantStatementsContract](tests/detectors/redundant-statements/redundant_statements.sol#L8)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/redundant_statements.sol#L3-L18)\n",
"id": "d93991180e8fe3accc3157f286d3a6781ed5c03398d68c0b9fde918a01d65ede",
"check": "redundant-statements",
"impact": "Informational",
"confidence": "High"
},
{
"elements": [
{
"type": "node",
"name": "uint256",
"source_mapping": {
"start": 257,
"length": 4,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/redundant-statements/redundant_statements.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/redundant-statements/redundant_statements.sol",
"is_dependency": false,
"lines": [
12
],
"starting_column": 9,
"ending_column": 13
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "test",
"source_mapping": {
"start": 209,
"length": 109,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/redundant-statements/redundant_statements.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/redundant-statements/redundant_statements.sol",
"is_dependency": false,
"lines": [
11,
12,
13,
14,
15,
16
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "RedundantStatementsContract",
"source_mapping": {
"start": 66,
"length": 254,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/redundant-statements/redundant_statements.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/redundant-statements/redundant_statements.sol",
"is_dependency": false,
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18
],
"starting_column": 1,
"ending_column": 0
}
},
"signature": "test()"
}
}
}
},
{
"type": "contract",
"name": "RedundantStatementsContract",
"source_mapping": {
"start": 66,
"length": 254,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/redundant-statements/redundant_statements.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/redundant-statements/redundant_statements.sol",
"is_dependency": false,
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18
],
"starting_column": 1,
"ending_column": 0
}
}
],
"description": "Redundant expression \"uint256 (tests/detectors/redundant-statements/redundant_statements.sol#12)\" inRedundantStatementsContract (tests/detectors/redundant-statements/redundant_statements.sol#3-18)\n",
"markdown": "Redundant expression \"[uint256](tests/detectors/redundant-statements/redundant_statements.sol#L12)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/redundant_statements.sol#L3-L18)\n",
"id": "262267538723f822ebe065e5976738ef3f564c791aaddb26867d202602de1eea",
"check": "redundant-statements",
"impact": "Informational",
"confidence": "High"
},
{
"elements": [
{
"type": "node",
"name": "assert(bool)",
"source_mapping": {
"start": 271,
"length": 6,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/redundant-statements/redundant_statements.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/redundant-statements/redundant_statements.sol",
"is_dependency": false,
"lines": [
13
],
"starting_column": 9,
"ending_column": 15
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "test",
"source_mapping": {
"start": 209,
"length": 109,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/redundant-statements/redundant_statements.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/redundant-statements/redundant_statements.sol",
"is_dependency": false,
"lines": [
11,
12,
13,
14,
15,
16
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "RedundantStatementsContract",
"source_mapping": {
"start": 66,
"length": 254,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/redundant-statements/redundant_statements.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/redundant-statements/redundant_statements.sol",
"is_dependency": false,
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18
],
"starting_column": 1,
"ending_column": 0
}
},
"signature": "test()"
}
}
}
},
{
"type": "contract",
"name": "RedundantStatementsContract",
"source_mapping": {
"start": 66,
"length": 254,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/redundant-statements/redundant_statements.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/redundant-statements/redundant_statements.sol",
"is_dependency": false,
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18
],
"starting_column": 1,
"ending_column": 0
}
}
],
"description": "Redundant expression \"assert(bool) (tests/detectors/redundant-statements/redundant_statements.sol#13)\" inRedundantStatementsContract (tests/detectors/redundant-statements/redundant_statements.sol#3-18)\n",
"markdown": "Redundant expression \"[assert(bool)](tests/detectors/redundant-statements/redundant_statements.sol#L13)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/redundant_statements.sol#L3-L18)\n",
"id": "00295b0d55ceb6d73eec5a4905d137edf751e11c951252b54cd42c43ace68ffd",
"check": "redundant-statements",
"impact": "Informational",
"confidence": "High"
},
{
"elements": [
{
"type": "node",
"name": "test",
"source_mapping": {
"start": 287,
"length": 4,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/redundant-statements/redundant_statements.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/redundant-statements/redundant_statements.sol",
"is_dependency": false,
"lines": [
14
],
"starting_column": 9,
"ending_column": 13
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "test",
"source_mapping": {
"start": 209,
"length": 109,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/redundant-statements/redundant_statements.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/redundant-statements/redundant_statements.sol",
"is_dependency": false,
"lines": [
11,
12,
13,
14,
15,
16
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "RedundantStatementsContract",
"source_mapping": {
"start": 66,
"length": 254,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/redundant-statements/redundant_statements.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/redundant-statements/redundant_statements.sol",
"is_dependency": false,
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18
],
"starting_column": 1,
"ending_column": 0
}
},
"signature": "test()"
}
}
}
},
{
"type": "contract",
"name": "RedundantStatementsContract",
"source_mapping": {
"start": 66,
"length": 254,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/redundant-statements/redundant_statements.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/redundant-statements/redundant_statements.sol",
"is_dependency": false,
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18
],
"starting_column": 1,
"ending_column": 0
}
}
],
"description": "Redundant expression \"test (tests/detectors/redundant-statements/redundant_statements.sol#14)\" inRedundantStatementsContract (tests/detectors/redundant-statements/redundant_statements.sol#3-18)\n",
"markdown": "Redundant expression \"[test](tests/detectors/redundant-statements/redundant_statements.sol#L14)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/redundant_statements.sol#L3-L18)\n",
"id": "ac50e063af6ebd33a702aa136415f7babc5fef3dc5212730b054d8a089b04e23",
"check": "redundant-statements",
"impact": "Informational",
"confidence": "High"
}
]
]