Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Human summary printer: run detectors only once #451

Merged
merged 2 commits into from
Apr 21, 2020
Merged

Conversation

montyly
Copy link
Member

@montyly montyly commented Apr 20, 2020

Currently the human summary printer will run the detectors for each contract, instead of running them once.

As the result, the human summary printer can take a significant amount of time for large codebase

@montyly
Copy link
Member Author

montyly commented Apr 21, 2020

In addition the human summary printer has in its json output the detectors results.

The results are in the ["additional_fields"]["detectors"'] field of the printer

{
    "success": true,
    "error": null,
    "results": {
        "printers": [
            {
                "elements": [],
                "description": "...",
                "markdown": "...",
                "id": "...",
                "additional_fields": {
                    "contracts": { ...},
                    "number_lines": 4,
                    "number_lines_in_dependencies": 0,
                    "number_lines_assembly": 0,
                    "standard_libraries": [],
                    "ercs": [],
                    "number_findings": {
                        "optimization_issues": 1,
                        "informational_issues": 0,
                        "low_issues": 0,
                        "medium_issues": 0,
                        "high_issues": 0
                    },
                    "detectors": [ ... ],
                    "number_lines__dependencies": 0
                },
                "printer": "human-summary"
            }
        ]
    }
}
``̀

@montyly montyly merged commit f946fa1 into dev Apr 21, 2020
@montyly montyly deleted the dev-human-summary branch April 21, 2020 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant