mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-07 22:54:17 -05:00
* Add log capitalization analyzer and apply fixes across codebase Implements a new nogo analyzer to enforce proper log message capitalization and applies the fixes to all affected log statements throughout the beacon chain, validator, and supporting components. Co-Authored-By: Claude <noreply@anthropic.com> * Radek's feedback --------- Co-authored-by: Claude <noreply@anthropic.com>
236 lines
6.5 KiB
JSON
236 lines
6.5 KiB
JSON
{
|
|
"unsafeptr": {
|
|
"exclude_files": {
|
|
"external/.*": "Unsafe third party code",
|
|
"rules_go_work-.*": "Third party code"
|
|
}
|
|
},
|
|
"unreachable": {
|
|
"exclude_files": {
|
|
"runtime/messagehandler/messagehandler_test.go": "Necessary panic before return for test",
|
|
"external/.*": "Unreachable third party code"
|
|
}
|
|
},
|
|
"lostcancel": {
|
|
"exclude_files": {
|
|
"validator/client/runner.go": "No need to cancel right when goroutines begin",
|
|
"external/.*": "Third party code"
|
|
}
|
|
},
|
|
"nilness": {
|
|
"exclude_files": {
|
|
"external/.*": "Third party code",
|
|
"rules_go_work-.*": "Third party code"
|
|
}
|
|
},
|
|
"pkgfact": {
|
|
"exclude_files": {
|
|
"external/.*": "Third party code",
|
|
"rules_go_work-.*": "Third party code"
|
|
}
|
|
},
|
|
"stdmethods": {
|
|
"exclude_files": {
|
|
"external/.*": "Third party code"
|
|
}
|
|
},
|
|
"copylocks": {
|
|
"exclude_files": {
|
|
"external/.*": "Third party code"
|
|
}
|
|
},
|
|
"composites": {
|
|
"exclude_files": {
|
|
"external/.*": "Third party code",
|
|
".*testmain\\.go$": "Fuzz"
|
|
}
|
|
},
|
|
"cgocall": {
|
|
"exclude_files": {
|
|
"external/.*": "Third party code"
|
|
}
|
|
},
|
|
"assign": {
|
|
"exclude_files": {
|
|
"external/.*": "Third party code"
|
|
}
|
|
},
|
|
"structtag": {
|
|
"exclude_files": {
|
|
"external/.*": "Third party code"
|
|
}
|
|
},
|
|
"maligned": {
|
|
"exclude_files": {
|
|
"external/.*": "Third party code",
|
|
"rules_go_work-.*": "Third party code",
|
|
"config/params/config.go": "This config struct needs to be organized for now",
|
|
"shared/featureconfig/config.go": "This config struct needs to be organized for now",
|
|
"proto/.*": "Excluding protobuf objects for now",
|
|
".*_mock.go": "Excluding generated mock files"
|
|
}
|
|
},
|
|
"errcheck": {
|
|
"exclude_files": {
|
|
"external/.*": "Third party code",
|
|
"rules_go_work-.*": "Third party code",
|
|
"shared/mock/.*\\.go": "Mocks are OK",
|
|
".*/.*mock\\.go": "Mocks are OK",
|
|
".*testmain\\.go$": "Fuzz",
|
|
"proto/.*": "Generated protobuf related code",
|
|
"tools/analyzers/properpermissions/testdata/.*": "Analyzer breaks rules"
|
|
}
|
|
},
|
|
"featureconfig": {
|
|
"only_files": {
|
|
".*_test\\.go": "Only tests"
|
|
}
|
|
},
|
|
"interfacechecker": {
|
|
"exclude_files": {
|
|
"external/.*": "Third party code",
|
|
"rules_go_work-.*": "Third party code",
|
|
".*/.*_test\\.go": "Tests are OK to ignore this check for"
|
|
}
|
|
},
|
|
"logruswitherror": {
|
|
"exclude_files": {
|
|
"external/.*": "Third party code",
|
|
".*/testmain.go": "Generated/test code"
|
|
}
|
|
},
|
|
"cryptorand": {
|
|
"only_files": {
|
|
"beacon-chain/.*": "",
|
|
"shared/.*": "",
|
|
"slasher/.*": "",
|
|
"validator/.*": ""
|
|
},
|
|
"exclude_files": {
|
|
".*/.*_test\\.go": "Tests are OK to use weak crypto",
|
|
"external/.*": "Third party code",
|
|
"crypto/rand/rand\\.go": "Abstracts CSPRNGs for common use",
|
|
"shared/aggregation/testing/bitlistutils.go": "Test-only package"
|
|
}
|
|
},
|
|
"comparesame": {
|
|
"exclude_files": {
|
|
"external/.*": "Third party code",
|
|
"rules_go_work-.*": "Third party code",
|
|
"tools/analyzers/comparesame/testdata/compare_len.go": "Analyzer testdata has to break rules"
|
|
}
|
|
},
|
|
"shadowpredecl": {
|
|
"exclude_files": {
|
|
"external/.*": "Third party code",
|
|
"rules_go_work-.*": "Third party code",
|
|
"tools/analyzers/shadowpredecl/testdata/shadow.go": "Analyzer testdata has to break rules"
|
|
}
|
|
},
|
|
"recursivelock": {
|
|
"exclude_files": {
|
|
"external/.*": "Third party code",
|
|
"rules_go_work-.*": "Third party code",
|
|
"tools/analyzers/recursivelock/testdata/.*": "Analyzer testdata has to break rules"
|
|
}
|
|
},
|
|
"nop": {
|
|
"exclude_files": {
|
|
"external/.*": "Third party code",
|
|
"rules_go_work-.*": "Third party code",
|
|
"tools/analyzers/nop/testdata/no_op.go": "Analyzer testdata has to break rules"
|
|
}
|
|
},
|
|
"slicedirect": {
|
|
"exclude_files": {
|
|
"external/.*": "Third party code",
|
|
"rules_go_work-.*": "Third party code",
|
|
"tools/analyzers/slicedirect/testdata/slice.go": "Analyzer testdata has to break rules"
|
|
}
|
|
},
|
|
"ineffassign": {
|
|
"exclude_files": {
|
|
"external/.*": "Third party code",
|
|
"rules_go_work-.*": "Third party code",
|
|
".*\\.pb.*.go": "Generated code is ok",
|
|
".*\\.ssz\\.go": "Generated code is ok"
|
|
}
|
|
},
|
|
"properpermissions": {
|
|
"only_files": {
|
|
"beacon-chain/.*": "",
|
|
"slasher/.*": "",
|
|
"shared/.*": "",
|
|
"validator/.*": ""
|
|
},
|
|
"exclude_files": {
|
|
".*_test\\.go": "Tests are ok",
|
|
"io/file/fileutil.go": "Package which defines the proper rules",
|
|
"validator/web/site_data.go": "Generated web ui assets"
|
|
}
|
|
},
|
|
"uintcast": {
|
|
"exclude_files": {
|
|
"external/.*": "Third party code",
|
|
"rules_go_work-.*": "Third party code",
|
|
".*_test\\.go": "Tests are ok"
|
|
}
|
|
},
|
|
"gocognit": {
|
|
"exclude_files": {
|
|
"external/.*": "Third party code",
|
|
"rules_go_work-.*": "Third party code",
|
|
".*\\.pb.*.go": "Generated code is ok",
|
|
".*\\.ssz\\.go": "Generated code is ok",
|
|
".*_test\\.go": "Tests are ok (for now)",
|
|
"tools/analyzers/ineffassign/ineffassign\\.go": "3rd party code with a massive switch statement"
|
|
}
|
|
},
|
|
"shift": {
|
|
"exclude_files": {
|
|
"external/.*": "Third party code",
|
|
"rules_go_work-.*": "Third party code"
|
|
}
|
|
},
|
|
"reflectvaluecompare": {
|
|
"exclude_files": {
|
|
"external/.*": "Third party code",
|
|
"rules_go_work-.*": "Third party code"
|
|
}
|
|
},
|
|
"unusedwrite": {
|
|
"exclude_files": {
|
|
"external/.*": "Third party code",
|
|
"rules_go_work-.*": "Third party code"
|
|
}
|
|
},
|
|
"stringintconv": {
|
|
"exclude_files": {
|
|
"external/.*": "Third party code",
|
|
"rules_go_work-.*": "Third party code"
|
|
}
|
|
},
|
|
"loopclosure": {
|
|
"exclude_files": {
|
|
"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"
|
|
}
|
|
},
|
|
"logcapitalization": {
|
|
"exclude_files": {
|
|
"external/.*": "Third party code",
|
|
"rules_go_work-.*": "Third party code",
|
|
".*/.*_test\\.go": "Test logs can be less formal",
|
|
"tools/analyzers/logcapitalization/testdata/.*": "Analyzer testdata has to break rules"
|
|
}
|
|
}
|
|
}
|