capture warnings from solhint

pull/3838/head
Joseph Izang 1 year ago
parent 2a537414de
commit e4208cc689
  1. 2
      libs/remix-ui/static-analyser/src/lib/actions/staticAnalysisActions.ts

@ -49,6 +49,7 @@ slitherEnabled: boolean, setStartAnalysis: React.Dispatch<React.SetStateAction<b
setHints([]) setHints([])
setSsaWarnings([]) setSsaWarnings([])
setSlitherWarnings([]) setSlitherWarnings([])
props.analysisModule.hints = []
if (!isSupportedVersion) return if (!isSupportedVersion) return
if (state.data !== null) { if (state.data !== null) {
if (lastCompilationResult && (categoryIndex.length > 0 || showSlither)) { if (lastCompilationResult && (categoryIndex.length > 0 || showSlither)) {
@ -57,6 +58,7 @@ slitherEnabled: boolean, setStartAnalysis: React.Dispatch<React.SetStateAction<b
// Run solhint // Run solhint
const hintsResult = await props.analysisModule.call('solhint', 'lint', state.file) const hintsResult = await props.analysisModule.call('solhint', 'lint', state.file)
props.analysisModule.hints = hintsResult
setHints(hintsResult) setHints(hintsResult)
const warningResult = calculateWarningStateEntries(Object.entries(warningState)) const warningResult = calculateWarningStateEntries(Object.entries(warningState))
props.analysisModule.emit('statusChanged', { key: hints.length+warningResult.length, props.analysisModule.emit('statusChanged', { key: hints.length+warningResult.length,

Loading…
Cancel
Save