sourcegraph/nogo_config.json
Varun Gandhi 17a0a6461c
chore: Remove redundant loop captures (#62264)
Go 1.22 changes loop variables to have more sensible
semantics where the variable is not reused across iterations
by the codegen, so we can simplify a bunch of code
working around that counterintuitive behavior.
2024-04-30 07:57:21 -06:00

51 lines
2.2 KiB
JSON

{
"_base": {
"description": "Base config which all analyzers will inherit, unless a specific config is given",
"exclude_files": {
"rules_go.*/.*": "ignore rules_go working directory",
"external/.*": "no need to vet third party code",
"schema/schema\\.go$": "ignore generated code",
".*_generated\\.go$": "ignore generated code",
".*_pb\\.go$": "ignore protobuff generated code",
"docker-images/.*": "ignore all code under docker-images",
"main\\.go$": "ignore main",
".*_test\\.go$": "ignore test code",
"internal/batches/testing/.*": "ignore batches testing code",
"internal/gitserver/mock\\.go$": "ignore deprecation warning of BatchLog",
"internal/gitserver/retry\\.go$": "ignore deprecation warning of BatchLog",
"internal/grpc/example/client/retry\\.go$": "ignore deprecation warning of GetCurrentWeatherOld",
"internal/grpc/example/server/faulty\\.go$": "ignore deprecation warning of GetCurrentWeatherOld",
"internal/database/dbmocks": "ignore generated database mocks"
}
},
"bodyclose": {
"exclude_files": {
"external/.*": "no need to vet third party code",
".*_generated\\.go$": "ignore generated code",
".*_pb\\.go$": "ignore protobuff generated code",
".*_test\\.go$": "exclude bodyclose lint from tests because leaking connections in tests is a non issue",
"internal/extsvc/": "ignore temporarily"
}
},
"forbidigo": {
"exclude_files": {
"rules_go.*/.*": "ignore rules_go working directory",
"external/": "no need to vet third party code",
"schema/schema\\.go": "ignore generated code",
"errors/cockroach\\.go": "ignore generated code",
".*_test\\.go$": "ignore test code",
".*_generated\\.go$": "ignore generated code",
".*_pb\\.go$": "ignore protobuff generated code",
"main\\.go$": "ignore main files"
}
},
"ineffassign": {
"exclude_files": {
"external/.*": "no need to vet third party code",
".*_generated\\.go$": "ignore generated code",
".*_pb\\.go$": "ignore protobuff generated code",
"dev/buildchecker/slack\\.go$": "ignore false positive"
}
}
}