mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Buglist check script supports json paths
This commit is contained in:
@@ -56,6 +56,19 @@ conditions
|
||||
is an object that can contain a boolean value ``optimizer``, which
|
||||
means that the optimizer has to be switched on to enable the bug.
|
||||
If no conditions are given, assume that the bug is present.
|
||||
check
|
||||
This field contains different checks that report whether the smart contract
|
||||
contains the bug or not. The first type of check are Javascript regular
|
||||
expressions that are to be matched against the source code ("source-regex")
|
||||
if the bug is present. If there is no match, then the bug is very likely
|
||||
not present. If there is a match, the bug might be present. For improved
|
||||
accuracy, the checks should be applied to the source code after stripping
|
||||
comments.
|
||||
The second type of check are patterns to be checked on the compact AST of
|
||||
the Solidity program ("ast-compact-json-path"). The specified search query
|
||||
is a `JsonPath <https://github.com/json-path/JsonPath>`_ expression.
|
||||
If at least one path of the Solidity AST matches the query, the bug is
|
||||
likely present.
|
||||
|
||||
.. literalinclude:: bugs.json
|
||||
:language: js
|
||||
|
||||
Reference in New Issue
Block a user