resolving conflict manually from rebase

pull/1104/head
tizah 4 years ago
parent 704010894a
commit 2f31e64e17
  1. 1
      libs/remix-ui/static-analyser/src/lib/ErrorRenderer.tsx
  2. 33
      libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx

@ -31,7 +31,6 @@ const ErrorRenderer = ({ message, opt, editor }: ErrorRendererProps) => {
if (!message) return if (!message) return
let position = getPositionDetails(message) let position = getPositionDetails(message)
console.log({ position })
if (!position.errFile || (opt.errorType && opt.errorType === position.errFile)) { if (!position.errFile || (opt.errorType && opt.errorType === position.errFile)) {
// Updated error reported includes '-->' before file details // Updated error reported includes '-->' before file details
const errorDetails = message.split('-->') const errorDetails = message.split('-->')

@ -69,24 +69,8 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
if (autoRun) { if (autoRun) {
if (state.data !== null) { if (state.data !== null) {
run(state.data, state.source, state.file) 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 () => { } return () => { }
}, [autoRun, categoryIndex, state]) }, [autoRun, categoryIndex, state])
@ -104,22 +88,8 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
) )
} }
const message = (name, warning, more, fileName, locationString) : string => {
return (`
<span className='d-flex flex-column'>
<span className='h6 font-weight-bold'>${name}</span>
${warning}
${more
? (<span><a href={more} target='_blank'>more</a></span>)
: (<span> </span>)
}
<span className="" title={Position in ${fileName}}>Pos: ${locationString}</span>
</span>`
)
}
const run = (lastCompilationResult, lastCompilationSource, currentFile) => { const run = (lastCompilationResult, lastCompilationSource, currentFile) => {
if (autoRun) { if (state.data !== null) {
if (lastCompilationResult && categoryIndex.length > 0) { if (lastCompilationResult && categoryIndex.length > 0) {
let warningCount = 0 let warningCount = 0
const warningMessage = [] const warningMessage = []
@ -312,7 +282,6 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
<div className="analysis_3ECCBV px-3 pb-1"> <div className="analysis_3ECCBV px-3 pb-1">
<div className="my-2 d-flex flex-column align-items-left"> <div className="my-2 d-flex flex-column align-items-left">
<div className="d-flex justify-content-between" id="staticanalysisButton"> <div className="d-flex justify-content-between" id="staticanalysisButton">
<div className="d-flex justify-content-between">
<RemixUiCheckbox <RemixUiCheckbox
id="checkAllEntries" id="checkAllEntries"
inputType="checkbox" inputType="checkbox"

Loading…
Cancel
Save