diff --git a/libs/remix-ui/static-analyser/src/lib/ErrorRenderer.tsx b/libs/remix-ui/static-analyser/src/lib/ErrorRenderer.tsx index cee2eaa18f..6364007668 100644 --- a/libs/remix-ui/static-analyser/src/lib/ErrorRenderer.tsx +++ b/libs/remix-ui/static-analyser/src/lib/ErrorRenderer.tsx @@ -31,7 +31,6 @@ const ErrorRenderer = ({ message, opt, editor }: ErrorRendererProps) => { if (!message) return let position = getPositionDetails(message) - console.log({ position }) if (!position.errFile || (opt.errorType && opt.errorType === position.errFile)) { // Updated error reported includes '-->' before file details const errorDetails = message.split('-->') diff --git a/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx b/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx index 27e7e55f1e..5bb91441af 100644 --- a/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx +++ b/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx @@ -69,23 +69,7 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { if (autoRun) { if (state.data !== null) { run(state.data, state.source, state.file) - if (autoRun) { - const setCompilationResult = async (data, source, file) => { - await setResult({ lastCompilationResult: data, lastCompilationSource: source, currentFile: file }) } - if (props.analysisModule) { - props.analysisModule.on( - 'solidity', - 'compilationFinished', - (file, source, languageVersion, data) => { - if (languageVersion.indexOf('soljson') !== 0) return - setCompilationResult(data, source, file) - if (categoryIndex.length > 0) { - run(data, source, file) - } - } - } - ) } return () => { } }, [autoRun, categoryIndex, state]) @@ -104,22 +88,8 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { ) } - const message = (name, warning, more, fileName, locationString) : string => { - return (` - - ${name} - ${warning} - ${more - ? (more) - : ( ) - } - Pos: ${locationString} - ` - ) - } - const run = (lastCompilationResult, lastCompilationSource, currentFile) => { - if (autoRun) { + if (state.data !== null) { if (lastCompilationResult && categoryIndex.length > 0) { let warningCount = 0 const warningMessage = [] @@ -312,7 +282,6 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {