Skip to content

Commit d60e5a1

Browse files
authored
build: fix slither report (#501)
- Use SARIF json format - Ignore style detectora - Ignore third-party contracts and tests - Skip redundant hardhat compile
1 parent 77b0b1f commit d60e5a1

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

scripts/analyze

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,14 @@ yarn build && \
1313

1414
echo "Analyzing contracts..."
1515
slither . \
16-
--filter-paths "bancor/*" \
17-
&> reports/analyzer-report.log && \
16+
--hardhat-ignore-compile \
17+
--hardhat-artifacts-directory ./build/contracts \
18+
--sarif - \
19+
--filter-paths "contracts/bancor/.*|contracts/tests/.*|contracts/staking/libs/Cobbs.*|contracts/staking/libs/LibFixedMath.*|contracts/staking/libs/MathUtils.*" \
20+
--exclude-dependencies \
21+
--exclude similar-names,naming-convention \
22+
--disable-color \
23+
&> reports/analyzer-report.sarif && \
1824
slither-check-erc build/flatten/GraphToken.sol GraphToken &> reports/analyzer-report-erc.log
1925

2026
echo "Done!"

0 commit comments

Comments
 (0)