|
|
@ -201,22 +201,24 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { |
|
|
|
let column = 0 |
|
|
|
let column = 0 |
|
|
|
let row = 0 |
|
|
|
let row = 0 |
|
|
|
let fileName = currentFile |
|
|
|
let fileName = currentFile |
|
|
|
if (item.sourceMap && item.sourceMap.length) { |
|
|
|
// There are issues with location for imported contract
|
|
|
|
location = { |
|
|
|
// which stops complete analysis including remix analyzer's
|
|
|
|
start: item.sourceMap[0].source_mapping.start, |
|
|
|
// if (item.sourceMap && item.sourceMap.length) {
|
|
|
|
length: item.sourceMap[0].source_mapping.length |
|
|
|
// location = {
|
|
|
|
} |
|
|
|
// start: item.sourceMap[0].source_mapping.start,
|
|
|
|
location = props.analysisModule._deps.offsetToLineColumnConverter.offsetToLineColumn( |
|
|
|
// length: item.sourceMap[0].source_mapping.length
|
|
|
|
location, |
|
|
|
// }
|
|
|
|
Object.keys(lastCompilationResult.sources).indexOf(item.sourceMap[0].source_mapping.filename_relative), |
|
|
|
// location = props.analysisModule._deps.offsetToLineColumnConverter.offsetToLineColumn(
|
|
|
|
lastCompilationSource.sources, |
|
|
|
// location,
|
|
|
|
lastCompilationResult.sources |
|
|
|
// Object.keys(lastCompilationResult.sources).indexOf(item.sourceMap[0].source_mapping.filename_relative),
|
|
|
|
) |
|
|
|
// lastCompilationSource.sources,
|
|
|
|
row = location.start.line |
|
|
|
// lastCompilationResult.sources
|
|
|
|
column = location.start.column |
|
|
|
// )
|
|
|
|
locationString = row + 1 + ':' + column + ':' |
|
|
|
// row = location.start.line
|
|
|
|
fileName = Object.keys(lastCompilationResult.contracts)[0] |
|
|
|
// column = location.start.column
|
|
|
|
} |
|
|
|
// locationString = row + 1 + ':' + column + ':'
|
|
|
|
|
|
|
|
// fileName = Object.keys(lastCompilationResult.contracts)[0]
|
|
|
|
|
|
|
|
// }
|
|
|
|
warningCount++ |
|
|
|
warningCount++ |
|
|
|
const msg = message(item.title, item.description, item.more, fileName, locationString) |
|
|
|
const msg = message(item.title, item.description, item.more, fileName, locationString) |
|
|
|
const options = { |
|
|
|
const options = { |
|
|
|