|
|
|
@ -69,6 +69,7 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { |
|
|
|
|
const [basicEnabled, setBasicEnabled] = useState(true) |
|
|
|
|
const [solhintEnabled, setSolhintEnabled] = useState(true) // assuming that solhint is always enabled
|
|
|
|
|
const [showSlither, setShowSlither] = useState(false) |
|
|
|
|
const [slitherEnabled, setSlitherEnabled] = useState(false) |
|
|
|
|
const [isSupportedVersion, setIsSupportedVersion] = useState(false) |
|
|
|
|
let [showLibsWarning, setShowLibsWarning] = useState(false) // eslint-disable-line prefer-const
|
|
|
|
|
const [categoryIndex, setCategoryIndex] = useState(groupedModuleIndex(groupedModules)) |
|
|
|
@ -138,9 +139,13 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { |
|
|
|
|
setSlitherWarnings([]) |
|
|
|
|
setSsaWarnings([]) |
|
|
|
|
// Show 'Enable Slither Analysis' checkbox
|
|
|
|
|
if (currentWorkspace && currentWorkspace.isLocalhost === true) setShowSlither(true) |
|
|
|
|
if (currentWorkspace && currentWorkspace.isLocalhost === true) { |
|
|
|
|
setShowSlither(true) |
|
|
|
|
setSlitherEnabled(true) |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
setShowSlither(false) |
|
|
|
|
setSlitherEnabled(false) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
props.analysisModule.on('manager', 'pluginDeactivated', (plugin) => { |
|
|
|
@ -150,6 +155,7 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { |
|
|
|
|
setWarningState([]) |
|
|
|
|
setHints([]) |
|
|
|
|
setSlitherWarnings([]) |
|
|
|
|
setSlitherEnabled(false) |
|
|
|
|
setSsaWarnings([]) |
|
|
|
|
// Reset badge
|
|
|
|
|
props.event.trigger('staticAnaysisWarning', []) |
|
|
|
@ -635,7 +641,7 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { |
|
|
|
|
inputType="checkbox" |
|
|
|
|
title="Run SolHint static analysis." |
|
|
|
|
onClick={handleLinterEnabled} |
|
|
|
|
checked={solhintEnabled} |
|
|
|
|
checked={solhintEnabled } |
|
|
|
|
label="Linter" |
|
|
|
|
onChange={() => {}} |
|
|
|
|
tooltipPlacement={'top-start'} |
|
|
|
@ -646,12 +652,12 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { |
|
|
|
|
id="enableSlither" |
|
|
|
|
inputType="checkbox" |
|
|
|
|
onClick={handleSlitherEnabled} |
|
|
|
|
checked={showSlither} |
|
|
|
|
disabled={false} |
|
|
|
|
checked={showSlither && slitherEnabled} |
|
|
|
|
disabled={slitherEnabled} |
|
|
|
|
label="Slither" |
|
|
|
|
onChange={() => {}} |
|
|
|
|
optionalClassName="mr-3" |
|
|
|
|
title="Run Slither static analysis." |
|
|
|
|
title={"Run Slither static analysis."} |
|
|
|
|
/> |
|
|
|
|
</div> |
|
|
|
|
<Button |
|
|
|
|