-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[chore] apply unkeyed literal initialization prevention #39832
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
Merged
songy23
merged 1 commit into
open-telemetry:main
from
atoulme:apply_checkapi_unkeyed_literal_initialization
May 22, 2025
Merged
[chore] apply unkeyed literal initialization prevention #39832
songy23
merged 1 commit into
open-telemetry:main
from
atoulme:apply_checkapi_unkeyed_literal_initialization
May 22, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
songy23
approved these changes
May 2, 2025
iblancasa
approved these changes
May 6, 2025
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
pjanotti
approved these changes
May 21, 2025
45d4152
to
185c731
Compare
23379a6
to
cb5bbf7
Compare
fe2f529
to
c486ab4
Compare
c486ab4
to
e9c8d0d
Compare
mx-psi
approved these changes
May 22, 2025
lahsivjar
approved these changes
May 22, 2025
sinkingpoint
approved these changes
May 22, 2025
dragonlord93
pushed a commit
to dragonlord93/opentelemetry-collector-contrib
that referenced
this pull request
May 23, 2025
…ry#39832) Adds a new check on checkapi that prevents the unkeyed initialization of literals. Unkeyed initialization breaks if the API exposed by the struct fields changes. Adding an anonymous _ struct{} field ensures all developers must use a named initialization. This is explained in more detail in open-telemetry/opentelemetry-collector#12360 This PR needs open-telemetry#39830 and open-telemetry#39831 merged first. Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
connector/datadog
connector/exceptions
connector/servicegraph
connector/spanmetrics
exporter/awss3
exporter/cassandra
exporter/elasticsearch
exporter/honeycombmarker
exporter/loadbalancing
exporter/logicmonitor
exporter/prometheusremotewrite
exporter/rabbitmq
extension/azureauth
extension/encoding/awscloudwatchmetricstreams
extension/encoding/awslogsencoding
extension/headerssetter
extension/observer/cfgardenobserver
extension/observer/hostobserver
processor/datadogsemantics
processor/deltatorate
Delta To Rate processor
processor/groupbyattrs
Group By Attributes processor
processor/k8sattributes
k8s Attributes processor
processor/metricsgeneration
Metrics Generation processor
processor/metricstransform
Metrics Transform processor
processor/remotetap
processor/resource
Resource processor
receiver/apache
receiver/apachespark
receiver/awscloudwatchmetrics
receiver/awsecscontainermetrics
receiver/awss3
receiver/awsxray
receiver/azuremonitor
receiver/chrony
receiver/cloudflare
receiver/cloudfoundry
receiver/datadog
receiver/filelog
receiver/filestats
receiver/fluentforward
receiver/gitlab
receiver/httpcheck
HTTP Check receiver
receiver/jaeger
receiver/journald
receiver/libhoney
receiver/loki
receiver/mongodbatlas
receiver/namedpipe
receiver/nginx
receiver/opencensus
receiver/otelarrow
receiver/purefa
receiver/purefb
receiver/snmp
receiver/solace
receiver/sqlquery
SQL query receiver
receiver/stef
receiver/syslog
receiver/tcpcheck
receiver/tcplog
receiver/tlscheck
receiver/udplog
receiver/wavefront
receiver/windowseventlog
receiver/zipkin
Zipkin receiver
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a new check on checkapi that prevents the unkeyed initialization of literals. Unkeyed initialization breaks if the API exposed by the struct fields changes. Adding an anonymous _ struct{} field ensures all developers must use a named initialization.
This is explained in more detail in open-telemetry/opentelemetry-collector#12360
This PR needs #39830 and #39831 merged first.