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

impl(language): unexport unnecessary fields #670

Merged
merged 2 commits into from
Jan 12, 2025

Conversation

julieqiu
Copy link
Member

@julieqiu julieqiu commented Jan 12, 2025

Unexport fields that do not need to be accessed outside of the language
package. This revealed several staticcheck and unparam errors, which
are also fixed.

--- FAIL: TestStaticCheck (1.55s)
        internal/language/golang.go:222:19: func (*goCodec).fqEnumValueName is unused (U1000)
--- FAIL: TestUnparam (1.17s)
        internal/language/golang.go:190:47: (*goCodec).messageName - state is unused
        internal/language/golang.go:230:47: (*goCodec).bodyAccessor - state is unused
        internal/language/golang.go:238:48: (*goCodec).httpPathFmt - state is unused
        internal/language/golang.go:252:49: (*goCodec).httpPathArgs - state is unused
        internal/language/rust.go:512:52: (*rustCodec).asQueryParameter - state is unused
        internal/language/rust.go:587:49: (*rustCodec).messageName - state is unused
        internal/language/rust.go:609:43: (*rustCodec).enumName - state is unused
        internal/language/rust.go:631:49: (*rustCodec).bodyAccessor - state is unused
        internal/language/rust.go:639:50: (*rustCodec).httpPathFmt - state is unused
        internal/language/rust.go:696:51: (*rustCodec).httpPathArgs - state is unused

@product-auto-label product-auto-label bot added the api: language Issues related to the Cloud Natural Language API API. label Jan 12, 2025
@julieqiu julieqiu marked this pull request as draft January 12, 2025 15:24
Copy link

codecov bot commented Jan 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.51%. Comparing base (a763603) to head (d66f5cb).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #670   +/-   ##
=======================================
  Coverage   95.51%   95.51%           
=======================================
  Files          31       31           
  Lines        1181     1181           
=======================================
  Hits         1128     1128           
  Misses         53       53           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@coryan coryan added sidekick Issues related to the code generator and removed api: language Issues related to the Cloud Natural Language API API. labels Jan 12, 2025
Unexport fields that do not need to be accessed outside of the language
package. This revealed several `staticcheck` and `unparam` errors, which
are now fixed.

--- FAIL: TestStaticCheck (1.55s)
        internal/language/golang.go:222:19: func (*goCodec).fqEnumValueName is unused (U1000)
--- FAIL: TestUnparam (1.17s)
        internal/language/golang.go:190:47: (*goCodec).messageName - state is unused
        internal/language/golang.go:230:47: (*goCodec).bodyAccessor - state is unused
        internal/language/golang.go:238:48: (*goCodec).httpPathFmt - state is unused
        internal/language/golang.go:252:49: (*goCodec).httpPathArgs - state is unused
        internal/language/rust.go:512:52: (*rustCodec).asQueryParameter - state is unused
        internal/language/rust.go:587:49: (*rustCodec).messageName - state is unused
        internal/language/rust.go:609:43: (*rustCodec).enumName - state is unused
        internal/language/rust.go:631:49: (*rustCodec).bodyAccessor - state is unused
        internal/language/rust.go:639:50: (*rustCodec).httpPathFmt - state is unused
        internal/language/rust.go:696:51: (*rustCodec).httpPathArgs - state is unused
@julieqiu julieqiu requested a review from coryan January 12, 2025 15:51
@julieqiu julieqiu marked this pull request as ready for review January 12, 2025 15:51
@julieqiu julieqiu merged commit 7331040 into googleapis:main Jan 12, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sidekick Issues related to the code generator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants