Uptake linter reporting on user-supplied template arguments - #5403
Draft
Timothee Guerin (timotheeguerin) wants to merge 3 commits into
Draft
Uptake linter reporting on user-supplied template arguments#5403Timothee Guerin (timotheeguerin) wants to merge 3 commits into
Timothee Guerin (timotheeguerin) wants to merge 3 commits into
Conversation
…template arguments microsoft/typespec#11862 lets a rule report on a library template member whose type came from an argument the user supplied. This surfaces one real finding in the ARM samples: Page<LogAnalyticsOperationResult> has no identifying property, now declared explicitly with @Identifiers(#[]).
Contributor
|
No changes needing a change description found. |
Contributor
📦 Package size report✅ No notable package size changes compared to the base branch. 13 package(s) with no notable change
Packed = gzipped |
Contributor
|
You can try these changes here
|
The Page<LogAnalyticsOperationResult> finding is no longer reported, since Page declares value as T[] rather than T, so the sample fix is reverted and this is now purely the core submodule bump.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Uptake of microsoft/typespec#11862, which lets a linter rule report on a member a library template declared when the user picked the type it has — ARM's
ResourceNameParameter<..., Type = Azure.Core.uuid>being the case that prompted it.No suppressions or spec changes are needed. The compiler change attributes a member only when the user supplied its type and passed something they cannot edit, so rules keep quiet about members whose problem lies in a model the author already owns. Validated against
azure-rest-api-specs: the previously hidden findings that surface are the ones the rules were written to catch (ArmResponse<unknown>,ArmResponse<NetworkTrace[]>), whilePage<T>and blanked-documentation members no longer produce noise.