FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
uniswap-interface/scripts/check-circular-imports.sh at main · KBryan/uniswap-interface · GitHub
KBryan
uniswap-interface
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
uniswap-interface
/
scripts
/
check-circular-imports.sh
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
30 lines (27 loc) · 656 Bytes
Breadcrumbs
uniswap-interface
/
scripts
/
check-circular-imports.sh
Copy path
File metadata and controls
executable file
·
30 lines (27 loc) · 656 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!
/bin/bash
entry=
$1
expected=
$2
out=
$(
npx madge -c
$entry
2>&1
)
if
[[
"
$expected
"
==
"
0
"
]]
;
then
if
[[
"
$out
"
==
*
"
No circular dependency found
"
*
]]
;
then
echo
"
Passed!
"
echo
"
"
echo
"
$out
"
exit
0
else
echo
"
Failed: expected
$expected
circular deps, but found some
"
echo
"
"
echo
"
$out
"
exit
1
fi
elif
[[
"
$out
"
==
*
"
Found
$expected
circular dependencies
"
*
||
"
$out
"
==
*
"
Found
$expected
circular dependency
"
*
]]
;
then
echo
"
Passed!
"
echo
"
"
echo
"
$out
"
exit
0
else
echo
"
Failed: expected
$expected
circular deps
"
echo
"
"
echo
"
$out
"
exit
1
fi
Back
|
FazBrowse Home
|
New Git URL