Skip to content

Ignore clippy::style lint group#4341

Open
heaths wants to merge 1 commit intoAzure:mainfrom
heaths:ignore-clippy-style
Open

Ignore clippy::style lint group#4341
heaths wants to merge 1 commit intoAzure:mainfrom
heaths:ignore-clippy-style

Conversation

@heaths
Copy link
Copy Markdown
Member

@heaths heaths commented May 4, 2026

We've had a number of toolchain updates - especially nightly - that have blocked PRs from merging
due to stylistic clippy lints, as well as some other lints that are worth considering.

We should be more thoughtful about when and how we update long-term, but for now we can at least reduce the noise.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates public Rust API surfaces in azure_identity and typespec_client_core to address APIView concerns, adds matching changelog entries, and relaxes the workspace-wide Clippy style lint group. It mainly replaces derived Debug implementations with manual ones and marks several public enums as #[non_exhaustive], with the downstream OpenTelemetry bridge adjusted to compile against those API changes.

Changes:

  • azure_identity: several public credential/option types now use manual Debug implementations, and UserAssignedId is now #[non_exhaustive].
  • typespec_client_core/azure_core: tracing enums AttributeArray, AttributeValue, SpanStatus, and SpanKind are now #[non_exhaustive], with changelog entries mirrored through re-exports.
  • Workspace lint config now allows the Clippy style group, and azure_core_opentelemetry adds fallback match arms for the newly non-exhaustive tracing enums.

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
sdk/identity/azure_identity/src/workload_identity_credential.rs Replaced derived Debug with manual redacted formatting for workload identity types.
sdk/identity/azure_identity/src/virtual_machine_managed_identity_credential.rs Replaced derived Debug with manual formatting for VM managed identity credential.
sdk/identity/azure_identity/src/managed_identity_credential.rs Marked UserAssignedId non-exhaustive and replaced derived Debug on managed identity types.
sdk/identity/azure_identity/src/imds_managed_identity_credential.rs Replaced derived Debug with manual formatting exposing only endpoint metadata.
sdk/identity/azure_identity/src/developer_tools_credential.rs Replaced derived Debug with manual formatting for developer tools credential/options.
sdk/identity/azure_identity/src/client_secret_credential.rs Replaced derived Debug with manual formatting for client secret credential and options.
sdk/identity/azure_identity/src/client_certificate_credential.rs Replaced derived Debug with manual formatting for client certificate credential and options.
sdk/identity/azure_identity/src/client_assertion_credential.rs Replaced derived Debug with manual formatting and simplified trait bound spelling.
sdk/identity/azure_identity/src/azure_pipelines_credential.rs Replaced derived Debug with manual formatting for Azure Pipelines credential/options.
sdk/identity/azure_identity/src/azure_developer_cli_credential.rs Replaced derived Debug with manual formatting for Azure Developer CLI credential/options.
sdk/identity/azure_identity/src/azure_cli_credential.rs Replaced derived Debug with manual formatting for Azure CLI credential/options.
sdk/identity/azure_identity/src/app_service_managed_identity_credential.rs Replaced derived Debug with manual formatting for App Service managed identity credential.
sdk/identity/azure_identity/CHANGELOG.md Documented the breaking UserAssignedId non-exhaustive change.
sdk/core/typespec_client_core/src/tracing/mod.rs Marked tracing status/kind enums non-exhaustive and simplified one type reference.
sdk/core/typespec_client_core/src/tracing/attributes.rs Marked tracing attribute enums non-exhaustive.
sdk/core/typespec_client_core/CHANGELOG.md Documented the tracing enum breaking changes.
sdk/core/azure_core/CHANGELOG.md Mirrored the tracing enum breaking changes for the re-exported API surface.
sdk/core/azure_core_opentelemetry/src/span.rs Added wildcard match arms so the OpenTelemetry span bridge compiles with non-exhaustive tracing enums.
sdk/core/azure_core_opentelemetry/src/attributes.rs Added wildcard match arms so attribute conversion compiles with non-exhaustive tracing enums.
Cargo.toml Allowed the workspace-wide Clippy style lint group.

azure_core::tracing::SpanKind::Client => opentelemetry::trace::SpanKind::Client,
azure_core::tracing::SpanKind::Producer => opentelemetry::trace::SpanKind::Producer,
azure_core::tracing::SpanKind::Consumer => opentelemetry::trace::SpanKind::Consumer,
_ => unimplemented!("unsupported value"),
let otel_status = match status {
SpanStatus::Unset => opentelemetry::trace::Status::Unset,
SpanStatus::Error { description } => opentelemetry::trace::Status::error(description),
_ => unimplemented!("unsupported value"),
AzureAttributeValue::Array(arr) => {
opentelemetry::Value::Array(opentelemetry::Array::from(AttributeArray(arr)))
}
_ => unimplemented!("unsupported value"),
values.into_iter().map(|s| s.into()).collect();
string_values.into()
}
_ => unimplemented!("unsupported value"),
/// Note that OpenTelemetry defines an `Ok` status but that status is reserved for application and service developers,
/// so libraries should never set it.
#[derive(Debug, PartialEq)]
#[non_exhaustive]
We've had a number of toolchain updates - especially nightly - that have blocked PRs from merging
due to stylistic clippy lints, as well as some other lints that are worth considering.

We should be more thoughtful about when and how we update long-term, but for now we can at least reduce the noise.
@heaths heaths force-pushed the ignore-clippy-style branch from 3252d84 to fc5fb43 Compare May 4, 2026 22:45
@heaths heaths changed the title ignore clippy style Ignore clippy::style lint group May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Azure.Core The azure_core crate Azure.Identity The azure_identity crate

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

2 participants