fixed review comments

pull/3838/head
Joseph Izang 1 year ago
parent 37ff1d75fe
commit f4ec9c142d
  1. 2
      apps/remix-ide-e2e/src/tests/staticAnalysis.test.ts
  2. 6
      libs/remix-ui/static-analyser/src/lib/actions/staticAnalysisActions.ts
  3. 960
      libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx
  4. 2
      libs/remix-ui/vertical-icons-panel/src/lib/components/Badge.tsx

@ -34,7 +34,7 @@ module.exports = {
'run analysis and filter results': function (browser: NightwatchBrowser) { 'run analysis and filter results': function (browser: NightwatchBrowser) {
browser browser
.clickLaunchIcon('filePanel') .clickLaunchIcon('filePanel')
.click('*[data-id="treeViewLitreeViewItemcontracts"]') // .click('*[data-id="treeViewLitreeViewItemcontracts"]')
.click('*[data-id="treeViewLitreeViewItemcontracts/2_Owner.sol"]') .click('*[data-id="treeViewLitreeViewItemcontracts/2_Owner.sol"]')
.clickLaunchIcon('solidity') .clickLaunchIcon('solidity')
.click('*[id="compileBtn"]') .click('*[id="compileBtn"]')

@ -52,20 +52,14 @@ slitherEnabled: boolean, setStartAnalysis: React.Dispatch<React.SetStateAction<b
if (!isSupportedVersion) return if (!isSupportedVersion) return
if (state.data !== null) { if (state.data !== null) {
if (lastCompilationResult && (solhintEnabled || basicEnabled || showSlither)) { if (lastCompilationResult && (solhintEnabled || basicEnabled || showSlither)) {
console.log('run analysis')
const warningMessage = [] const warningMessage = []
const warningErrors = [] const warningErrors = []
props.analysisModule.hints = [] props.analysisModule.hints = []
// Run solhint // Run solhint
console.log('solhint about to start')
_paq.push(['trackEvent', 'solidityStaticAnalyzer', 'analyze', 'solHint']) _paq.push(['trackEvent', 'solidityStaticAnalyzer', 'analyze', 'solHint'])
const hintsResult = await props.analysisModule.call('solhint', 'lint', state.file) const hintsResult = await props.analysisModule.call('solhint', 'lint', state.file)
props.analysisModule.hints = solhintEnabled === false ? 0 : hintsResult props.analysisModule.hints = solhintEnabled === false ? 0 : hintsResult
setHints(hintsResult) setHints(hintsResult)
// const warningResult = calculateWarningStateEntries(Object.entries(warningState))
// props.analysisModule.emit('statusChanged', { key: hints.length+warningResult.length,
// title: `${hints.length+warningResult.length} warning${hints.length+warningResult.length === 1 ? '' : 's'}`, type: 'warning'})
// Remix Analysis // Remix Analysis
_paq.push(['trackEvent', 'solidityStaticAnalyzer', 'analyze', 'remixAnalyzer']) _paq.push(['trackEvent', 'solidityStaticAnalyzer', 'analyze', 'remixAnalyzer'])
const results = runner.run(lastCompilationResult, categoryIndex) const results = runner.run(lastCompilationResult, categoryIndex)

@ -75,7 +75,7 @@ function Badge ({ badgeStatus }: BadgeProps) {
</CustomTooltip> </CustomTooltip>
) : null} ) : null}
</> </>
); )
} }
export default Badge export default Badge

Loading…
Cancel
Save