Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
91932c2a
Commit
91932c2a
authored
Aug 24, 2021
by
yann300
Committed by
Aniket
Aug 26, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
e2e test: running static analysis with remixd and hardhat
parent
e873dac6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletion
+23
-1
remixd.test.ts
apps/remix-ide-e2e/src/tests/remixd.test.ts
+22
-0
remix-ui-static-analyser.tsx
...x-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx
+1
-1
No files found.
apps/remix-ide-e2e/src/tests/remixd.test.ts
View file @
91932c2a
...
...
@@ -34,6 +34,13 @@ const sources = [
},
{
'test_import_node_modules_with_github_import.sol'
:
{
content
:
'import "openzeppelin-solidity/contracts/sample.sol";'
}
},
{
'test_static_analysis_with_remixd_and_hardhat.sol'
:
{
content
:
`
import "hardhat/console.sol";
contract test5 { function get () public returns (uint) { return 8; }}`
}
}
]
...
...
@@ -71,6 +78,21 @@ module.exports = {
.
setSolidityCompilerVersion
(
'soljson-v0.8.0+commit.c7dfd78e.js'
)
// open-zeppelin moved to pragma ^0.8.0
.
testContracts
(
'test_import_node_modules_with_github_import.sol'
,
sources
[
4
][
'test_import_node_modules_with_github_import.sol'
],
[
'ERC20'
,
'test11'
])
},
'Static Analysis run with remixd'
:
function
(
browser
)
{
browser
.
testContracts
(
'Untitled.sol'
,
sources
[
5
][
'test_static_analysis_with_remixd_and_hardhat'
],
[
'test5'
])
.
clickLaunchIcon
(
'solidityStaticAnalysis'
)
.
click
(
'#staticanalysisButton button'
)
.
waitForElementPresent
(
'#staticanalysisresult .warning'
,
2000
,
true
,
function
()
{
browser
.
click
(
'[data-id="staticAnalysisModuleMiscellaneous1"'
)
.
click
(
'[data-id="staticAnalysisModuleMiscellaneous1"'
)
.
getEditorValue
((
content
)
=>
{
browser
.
assert
.
ok
(
content
.
indexOf
(
'function _sendLogPayload(bytes memory payload) private view {'
)
!==
-
1
,
'code has not been loaded'
)
})
})
},
'Run git status'
:
''
+
function
(
browser
)
{
browser
...
...
libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx
View file @
91932c2a
...
...
@@ -471,7 +471,7 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
<
span
className=
"text-dark h6"
>
{
element
[
0
]
}
</
span
>
{
element
[
1
][
'map'
]((
x
,
i
)
=>
(
// eslint-disable-line dot-notation
x
.
hasWarning
?
(
// eslint-disable-next-line dot-notation
<
div
id=
{
`staticAnalysisModule${element[1]['warningModuleName']
}`
}
key=
{
i
}
>
<
div
data
-
id=
{
`staticAnalysisModule${x.warningModuleName}${i}`
}
id=
{
`staticAnalysisModule${x.warningModuleName}${i
}`
}
key=
{
i
}
>
<
ErrorRenderer
message=
{
x
.
msg
}
opt=
{
x
.
options
}
warningErrors=
{
x
.
warningErrors
}
editor=
{
props
.
analysisModule
}
/>
</
div
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment