mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 04:54:05 -05:00
Add static analyzer to discourage use of panic() (#15075)
* Implement static analysis to prevent panics * Add nopanic to nogo * Fix violations and add exclusions Fix violations and add exclusions for all * Changelog fragment * Use pass.Report instead of pass.Reportf * Remove strings.ToLower for checking init method name * Add exclusion for herumi init * Move api/client/beacon template function to init and its own file * Fix nopanic testcase
This commit is contained in:
@@ -214,5 +214,13 @@
|
||||
"external/com_github_ethereum_go_ethereum/.*": "Unsafe third party code",
|
||||
"rules_go_work-.*": "Third party code"
|
||||
}
|
||||
},
|
||||
"nopanic": {
|
||||
"exclude_files": {
|
||||
"validator/web/site_data.go": "generated code",
|
||||
".*/.*_test\\.go": "Tests are OK",
|
||||
".*/main\\.go": "main methods are OK",
|
||||
"external/.*": "Third party code"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user