Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add unparam as a presubmit check #10782

Open
julieqiu opened this issue Aug 28, 2024 · 1 comment
Open

add unparam as a presubmit check #10782

julieqiu opened this issue Aug 28, 2024 · 1 comment
Labels
type: process A process-related concern. May include testing, release, or the like.

Comments

@julieqiu
Copy link
Member

unparam is a common linter for Go projects. We should consider adding it as a presubmit check for PRs to catch things like googleapis/gapic-generator-go#1407

See googleapis/gapic-generator-go#1408 for a related issue.

Example issues in this repository:

auth  ❯ unparam ./...                                                                   
credentials/impersonate/user.go:33:123: user - result 1 (error) is always nil
internal/transport/cert/cmd/test_signer.go:59:95: (*EnterpriseCertSigner).CertificateChain - result 0 (error) is always nil
bigquery ❯ unparam ./...                                                               
iterator.go:369:22: fetchCachedPage - ctx is unused
model.go:232:54: bqToModelMetadata - result 1 (error) is always nil
routine.go:240:87: bqToRemoteFunctionOptions - result 1 (error) is always nil
routine.go:258:70: (*RemoteFunctionOptions).toBQ - result 1 (error) is always nil
storage/managedwriter/adapt/protoconversion.go:414:158: tableFieldSchemaToFieldDescriptorProto - result 1 (error) is always nil
storage/managedwriter/managed_stream.go:197:60: (*ManagedStream).appendWithRetry - opts is unused
storage/managedwriter/managed_stream.go:358:57: (*ManagedStream).processRetry - srcConn is unused
storage/managedwriter/retry.go:36:46: retryPredicate - result aggressiveBackoff is always false
@julieqiu julieqiu added the triage me I really want to be triaged. label Aug 28, 2024
@quartzmo quartzmo added the type: process A process-related concern. May include testing, release, or the like. label Aug 28, 2024
@quartzmo
Copy link
Member

Great suggestion, thanks!

@codyoss codyoss removed the triage me I really want to be triaged. label Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: process A process-related concern. May include testing, release, or the like.
Projects
None yet
Development

No branches or pull requests

3 participants