|
|
@ -52,20 +52,14 @@ slitherEnabled: boolean, setStartAnalysis: React.Dispatch<React.SetStateAction<b |
|
|
|
if (!isSupportedVersion) return |
|
|
|
if (!isSupportedVersion) return |
|
|
|
if (state.data !== null) { |
|
|
|
if (state.data !== null) { |
|
|
|
if (lastCompilationResult && (solhintEnabled || basicEnabled || showSlither)) { |
|
|
|
if (lastCompilationResult && (solhintEnabled || basicEnabled || showSlither)) { |
|
|
|
console.log('run analysis') |
|
|
|
|
|
|
|
const warningMessage = [] |
|
|
|
const warningMessage = [] |
|
|
|
const warningErrors = [] |
|
|
|
const warningErrors = [] |
|
|
|
props.analysisModule.hints = [] |
|
|
|
props.analysisModule.hints = [] |
|
|
|
// Run solhint
|
|
|
|
// Run solhint
|
|
|
|
console.log('solhint about to start') |
|
|
|
|
|
|
|
_paq.push(['trackEvent', 'solidityStaticAnalyzer', 'analyze', 'solHint']) |
|
|
|
_paq.push(['trackEvent', 'solidityStaticAnalyzer', 'analyze', 'solHint']) |
|
|
|
const hintsResult = await props.analysisModule.call('solhint', 'lint', state.file) |
|
|
|
const hintsResult = await props.analysisModule.call('solhint', 'lint', state.file) |
|
|
|
props.analysisModule.hints = solhintEnabled === false ? 0 : hintsResult |
|
|
|
props.analysisModule.hints = solhintEnabled === false ? 0 : hintsResult |
|
|
|
setHints(hintsResult) |
|
|
|
setHints(hintsResult) |
|
|
|
// const warningResult = calculateWarningStateEntries(Object.entries(warningState))
|
|
|
|
|
|
|
|
// props.analysisModule.emit('statusChanged', { key: hints.length+warningResult.length,
|
|
|
|
|
|
|
|
// title: `${hints.length+warningResult.length} warning${hints.length+warningResult.length === 1 ? '' : 's'}`, type: 'warning'})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Remix Analysis
|
|
|
|
// Remix Analysis
|
|
|
|
_paq.push(['trackEvent', 'solidityStaticAnalyzer', 'analyze', 'remixAnalyzer']) |
|
|
|
_paq.push(['trackEvent', 'solidityStaticAnalyzer', 'analyze', 'remixAnalyzer']) |
|
|
|
const results = runner.run(lastCompilationResult, categoryIndex) |
|
|
|
const results = runner.run(lastCompilationResult, categoryIndex) |
|
|
|