Commit 079330f
feat: add --foundry-deny flag to control forge diagnostic errors (#637)
* feat: add --foundry-deny flag to control forge diagnostic errors
Forge's linter returns exit code 1 on warnings, causing crytic-compile to
interpret this as a compilation failure even when Solidity compilation
succeeded. This breaks analysis of many Foundry projects that have linter
warnings.
- Add `--deny never` to forge build command by default
- Add `--foundry-deny` flag to allow users to override if needed
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* feat: add version detection for --deny flag (Foundry 1.4+)
The --deny flag is only available in Foundry 1.4+. This change:
- Adds version detection for forge
- Only adds --deny when forge >= 1.4.0
- Changes default from "never" to None (auto-detect)
- Updates help text to reflect auto-detection behavior
Co-Authored-By: Claude Opus 4.5 <[email protected]>
---------
Co-authored-by: Claude Opus 4.5 <[email protected]>1 parent f0e771f commit 079330f
File tree
3 files changed
+42
-1
lines changed- crytic_compile
- cryticparser
- platform
3 files changed
+42
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
465 | 465 | | |
466 | 466 | | |
467 | 467 | | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
25 | 48 | | |
26 | 49 | | |
27 | 50 | | |
| |||
45 | 68 | | |
46 | 69 | | |
47 | 70 | | |
48 | | - | |
| 71 | + | |
49 | 72 | | |
50 | 73 | | |
51 | 74 | | |
| |||
60 | 83 | | |
61 | 84 | | |
62 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
63 | 92 | | |
64 | 93 | | |
65 | 94 | | |
66 | 95 | | |
67 | 96 | | |
68 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
69 | 101 | | |
70 | 102 | | |
71 | 103 | | |
| |||
0 commit comments