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
420eb68b
Commit
420eb68b
authored
Apr 19, 2021
by
tizah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix failing test
rebase fix failing test
parent
2e16a23a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
2 deletions
+34
-2
remix-ui-static-analyser.tsx
...x-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx
+34
-2
No files found.
libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx
View file @
420eb68b
...
...
@@ -62,6 +62,7 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
const
[
state
,
dispatch
]
=
useReducer
(
analysisReducer
,
initialState
)
useEffect
(()
=>
{
<<
<
<<<<
HEAD
compilation
(
props
.
analysisModule
,
dispatch
)
},
[])
...
...
@@ -71,14 +72,26 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
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
})
}
>>>>>>>
8
a85ae84e
(
fix
failing
test
)
if
(
props
.
analysisModule
)
{
props
.
analysisModule
.
on
(
'solidity'
,
'compilationFinished'
,
(
file
,
source
,
languageVersion
,
data
)
=>
{
if
(
languageVersion
.
indexOf
(
'soljson'
)
!==
0
)
return
setCompilationResult
(
data
,
source
,
file
)
run
(
data
,
source
,
file
)
if
(
categoryIndex
.
length
>
0
){
run
(
data
,
source
,
file
)
}
}
)
>>>>>>>
19
de4ba6b
(
commiting
code
to
detect
failing
test
)
...
...
@@ -88,6 +101,7 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
}
return
()
=>
{
}
<
<<<<<<
HEAD
},
[
autoRun
,
categoryIndex
,
state
])
const
message
=
(
name
,
warning
,
more
,
fileName
,
locationString
)
:
string
=
>
{
...
...
@@ -103,6 +117,9 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
</span>`
)
}
=======
}, [autoRun, categoryIndex])
>>>>>>>
8a85ae84e (fix failing test)
const run = (lastCompilationResult, lastCompilationSource, currentFile) =
>
{
<
<<<<<<
HEAD
...
...
@@ -198,11 +215,25 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
if
(
categoryIndex
.
length
>
0
)
{
props
.
event
.
trigger
(
'staticAnaysisWarning'
,
[
warningCount
])
}
<
<<<<<<
HEAD
}
else
{
if
(
categoryIndex
.
length
)
{
warningContainer
.
current
.
innerText
=
'
No
compiled
AST
available
'
}
props
.
event
.
trigger
('
staticAnaysisWarning
',
[-1])
=======
const
groupedCategory
=
groupBy
(
resultArray
,
'
warningModuleName
')
setWarningState
(
groupedCategory
)
})
if
(
categoryIndex
.
length
>
0)
{
props
.
event
.
trigger
(
'staticAnaysisWarning'
,
[
warningCount
])
}
}
else
{
setRunButtonState
(
true
)
if
(
categoryIndex
.
length
)
{
warningContainer
.
current
.
innerText
=
'No compiled AST available'
>>>>>>>
8
a85ae84e
(
fix
failing
test
)
}
}
}
...
...
@@ -216,8 +247,9 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
})
)
}
else
{
setCategoryIndex
(
_
.
uniq
([...
categoryIndex
,
...
index
]))
setCategoryIndex
(
_
.
uniq
([...
categoryIndex
]))
}
}
const handleCheckOrUncheckCategory = (category) =
>
{
...
...
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