Feel free to open PRs or open issues within this repository.
To add an issue to the analyzer, you have 2 choices:
- use a detector based on a simple regex
- use a detector based on the analysis of the Abstract Syntax Tree generated by the
solc
compiler
Examples:
Following this type, just add a file in the issues/<X>
folder:
type RegexIssue = {
type: IssueTypes.GAS | IssueTypes.NC | IssueTypes.L | IssueTypes.M | IssueTypes.H,
regex: RegExp,
title: string,
impact?: string,
description?: string,
regexOrAST: 'Regex',
};
Examples:
Following this type, just add a file in the issues/<X>
folder:
type ASTIssue = {
type: IssueTypes.GAS | IssueTypes.NC | IssueTypes.L | IssueTypes.M | IssueTypes.H,
title: string,
impact?: string,
description?: string,
detector: (files: InputType) => Instance[], // Function analyzing the AST and returning instances of the issue
regexOrAST: 'AST',
};
Examples: